I can't fix it, please tell me what's wrong with this

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>
ReactDom.render(JSX,getElementById("challenge-node"));
</div>
);
// Change code below this line

  **Your browser information:**

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

Challenge: Render HTML Elements to the DOM

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

Did you change code below this line, or above it?

Hi @yassine-elgorfti !

Welcome to the forum!

There are a few issues so I would reset the lesson.

The first one is that you didn’t follow directions on where to write your code.

That part is pretty important.

Once you write it in the correct spot then there are a couple more errors .

The instructions say this
The code editor has a simple JSX component. Use the ReactDOM.render() method to render this component to the page.

But you wrote this which is incorrect

Also, the instructions say this
You can pass defined JSX elements directly in as the first argument and use document.getElementById() to select the DOM node

But you wrote this instead which is incorrect

When going through these exercises pay close attention to the instructions

Hope that helps!

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