React - Render HTML Elements to the DOM

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.124 YaBrowser/22.9.5.710 Yowser/2.5 Safari/537.36

Challenge: React - Render HTML Elements to the DOM

Link to the challenge:

Я не понимаю вопроса для решения этой задачи,зачем такие сложности создавать?кто может в деталях обьяснить что там нужно делать?
Я понимаю это так,ReactDOM.render(JSX);

You need to pass in 2 arguments to the render() function.

The first is JSX, which you’ve done correctly.

The second is a DOM node. The instructions tell you to use document.getElementById() to select an element with the ID "challenge-node".

For example, if I had an element with the ID "target", I could select it with document.getElementById("target").

Так что бы мне выбрать document.getElementById() у меня должен быть id,а в терминале его нет по этому мне и не понятно что тут писать в коде.

Maybe the instructions didn’t get translated correctly. Here’s the important sentence:

There is a div with id='challenge-node' available for you to use.

So you need to select the element with the ID "challenge-node".

const JSX = (

Hello World

Lets render this to the DOM

); // Change code below this line в коде нет `div` с`id='challenge-node'`

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