Let’s examine the code that you just wrote. Start in previous.js, on line 5, all the way to the left.
You can see something called
ReactDOM. What’s that?
We’ll talk more later about how
ReactDOM got into your file. For now, just understand that it’s yours to use.
Move slightly to the right, and you can see one of
ReactDOM.render() is the most common way to render JSX. It takes a JSX expression, creates a corresponding tree of DOM nodes, and adds that tree to the DOM. That is the way to make a JSX expression appear onscreen.
Move to the right a little more, and you come to this expression:
This is the first argument being passed to
ReactDOM.render()‘s first argument should be a JSX expression, and it will be rendered to the screen.
We’ll discuss the second argument in the next exercise!
Starting on line 5, call
Pass in this expression as a first argument:
Pass in this expression as a second argument: