React - Render HTML Elements to the DOM

Tell us what’s happening:

const JSX = (

header

paragraph

);

//const element = document.getElementById(‘challenge-node’);
//element.style.backgroundColor = “red”;

ReactDOM.render(JSX, document.getElementById(‘challenge-node’));

This should complete the Render HTML elements to the DOM challenge, but it’s not working…?

Your code so far

const JSX = (
  <div>
    <h1>header</h1>
    <p>paragraph</p>
  </div>
);

//const element = document.getElementById('challenge-node');
//element.style.backgroundColor = "red";

ReactDOM.render(JSX, document.getElementById('challenge-node'));

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0

Challenge Information:

React - Render HTML Elements to the DOM

Hi there!

You have modified the existing jsx code. Reset the challenge step and just follow the instructions.
The instructions is asking 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 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. Make sure you don’t change the JSX constant.