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
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
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.
thanks .