Why is it giving an error ReactDom is not defined?

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

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'));
  **Your browser information:**

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

Challenge: Render HTML Elements to the DOM

Link to the challenge:


Why this challenge giving error despite writing a correct code, please help. Kindly refer to the attached screenshot for more info.

You code is almost correct but there is a mistake in your code.

You have typed ReactDom.render(), but it is ReactDOM.render()

Yea, remember it’s case-sensitive.

thanks its working now

1 Like