React - Render HTML Elements to the DOM

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

Your code so far

[TypeError: Cannot read properties of undefined (reading ‘innerHTML’)] This is the error message I keep getting, don’t know what am doing wrong.

import ReactDOM from 'react-dom';
const JSX = (
  <div>
    <h1>Hello World</h1>
    <p>Lets render this to the DOM</p>
  </div>
);
// Add your code below this line
ReactDom.render(JSX, Document.getElementById('challenge-node'));

Your browser information:

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

Challenge: React - Render HTML Elements to the DOM

Link to the challenge:

Hi there and welcome to our community!

You have two small errors here:

Check the capitalisation of the two bits I’ve highlighted.
Also, if you’re completing this challenge in browser, you don’t need to import ReactDOM.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.