Then the last section we started to try to render a component into the dub. 2
We got an error however that said that re-act wasn't defined. 3
So we imported react as a javascript module into this file. 4
So now we can reasonably believe that we can call re-act surrender and we won't get an error. 5
So I'm going to save this file flip open to the browser and refresh Let's see what happens. 6
OK so re-act out render is deprecated please use re-act Dom instead and also invalid component element 7
instead of passing component class. 8
Make sure you instantiated by Palestinian to react create element. 9
OK so let's flip back over to our code here in our file. 10
We've imported library called re-act right. 11
Re-act however is starting to diverged into two separate libraries. 12
The core re-act library which we've already imported here knows how to work with re-act components so 13
knows how to render them how to nest them together and so on the functionality to actually render them 14
to the dorm however. 15
So to take a component and insert it into the DOM is now a separate library called re-act Dom. 16
So right now if you go to say you know re-act dog have done io the wrecked home page and you try to 17
download react. 18
You're going to see both react and react domm. 19
So to actually render a component to the DOM we don't use the re-act library. 20
We use the react Dolemite start. 21
I say react on. 22
We don't use react. 23
We use react. 24
That's why I meant to say. 25
OK. 26
So fortunately our project has already installed react on them in here as well. 27
So let's give this a shot we'll say import re-act Dom from re-act Dom. 28
So we now have access to the variable reactor we have access to that library. 29
So let's go ahead and update our render statement react dobbed render app. 30
So again we use react on here because we're trying to render something to the dom or trying to you know 31
touch the dog directly. 32
Whenever we do that we use to react on library not react. 33
OK. 34
So let's go ahead and try this on the browser. 35
And it looks like it fixed the first stair but we still have the second one still has something here 36
about make sure to instantiate it by passing it to react create element. 37
Let's address this air in the next section