Render HTML Elements to the DOM Why?

Render HTML Elements to the DOM Why?
0

#1
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"));
type or paste code here

#2

You create JSX inside JavaScript but we need away to connect it to the HTML. The line:

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

is how we do it. You only need that one id in the HTML and React can connect mountains and mountains of JSX. It will make more sense as you build more React things.


#3

thanks :heart_eyes: .