Tell us what’s happening:
I am getting following error message
The provided JSX element should render to the DOM node with id challenge-node.
the code syntax is correct.Kindly help

Your code so far

const JSX = (
    <h1>Hello World</h1>
    <p>Lets render this to the DOM</p>
// change code below this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36.

Link to the challenge:


Why are you using the following for the componentToRender argument?

JSX should be the first argument for the render function, because it is the component you want to render. The second argument is the DOM node you want to render JSX to, so you should be using document…getElementById(‘challenge-node’) in some way for the 2nd argument. My suggestion is to create a variable which references the div with id=‘challenge-node’ and pass that into the render function as the 2nd argument.

1 Like

It’s ok, just change the first argument of the ReactDOM.render function to JSX.