Need help with React excercise

an suppose to render a JSX constant with ReactDOM.render(). It the id of the target am to render to is provided but when i write the code i get an error saying the id is not defined. Could anyone help me here?

Could you share your code, and a link to the exercise?

try ReactDOM.render()

here is the link to the project
https://learn.freecodecamp.org/front-end-libraries/react/render-html-elements-to-the-dom/

here is my code

const JSX = (
  <div>
    <h1>Hello World</h1>
    <p>Lets render this to the DOM</p>
  </div>
);
// change code below this line
ReactDOM.render(JSX, document.getElementById(challenge-node))

challenge-node should be a string

1 Like

yeah thanks didn’t notice that