Need help with React excercise

Need help with React excercise
0

#1

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?


#2

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


#3

try ReactDOM.render()


#4

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))

#5

challenge-node should be a string


#6

yeah thanks didn’t notice that