What have you tried?
Looking at the instructions, all the information is there.
You need to add a line at the bottom, of the form of:
ReactDOM.render(componentToRender, targetNode)
You need to add a line like this. This is a method that tells React how to connect up to the app. The componentToRender is the root component of your React app (in your React code) and the targetNode is the element in your HTML where you want your React to render. (You can’t actually see it in this case because it would be in an HTML file, but they are telling you the standard way to connect to it.)
So, you need that line above and you need to substitute for those two parameters.
So, what is _ componentToRender_? The instructions tell you:
The code editor has a simple JSX component. Use the ReactDOM.render()
method to render this component to the page. You can pass defined JSX elements directly in as the first argument …
So, it is the code that is already given, with the very convenient name.
So, what is targetNode? This is a little more complicated, but again, the instructions say:
… and use document.getElementById()
to select the DOM node to render them to. There is a div
with id='challenge-node'
available for you to use.
So, for the second parameter, you need a DOM node. It is telling you there is a (hidden from you) DOM element with a specific ID and you can use document.getElementById to get a reference to that node. So, you call document.getElementById pass it the relevant ID and it will return the reference, which then becomes your second parameter to the render method_, You can store it in a variable, but it is more common just to do it right inline.
Does that help?