Nood question how to run React on codepen

Nood question how to run React on codepen
0

#1

Hello, esterday I started React Challenges
And here I got stuped question
At first I just run example from React native page
and it run correctly
then I run some examples which I wrote on the brackets then inqlude some link to the codepen library
and it alsaw run fine.
But when I just copy paste the code from React native page it did not run
Here is my code codepen

On HTML area

<div id="root"></div>

then JS

ReactDOM.render(
  <h1>Hello, world!</h1>,
  document.getElementById('root')
);

But nothing happened
when I run Ctr+Shif+j the error is

Uncaught SyntaxError: Unexpected token </h1> 

What I must to do what is wrong?


#2

go into pen settings and add react as an external script. It s not native in Codepen.


#3