Take this example: https://codepen.io/gaearon/pen/MjrdWg?editors=1010 and look at the jsx code getting passed in at line 2 on the JS file side. You should be able to edit the <h1> tags in the JS code there with: <h1>Emmyxiano </h1>
That codepen is importing react as a dependency (if you click the cog icon and look at the Pen Settings > JS, you can see react.development.js and react-dom.development.js being imported which your codepen isn't doing.
Again, a lot of that is npm / babel setup, which I why I keep recommending starting with the working hello world examples and then focusing on editing the code from there
Oh! Finally, I didn't look at the cog icon. Sorry for that, but in my case, I am using VScode, but copy the codes to codepen so I could easily share the link here for people to help debug. In this case, the react.development. js and react-dom.development. js would be pasted in HTML head tag on vscode or on my script.js?
View all comments
Show parent comment
2
u/elquesobandit May 29 '22
Take this example: https://codepen.io/gaearon/pen/MjrdWg?editors=1010 and look at the jsx code getting passed in at line 2 on the JS file side. You should be able to edit the <h1> tags in the JS code there with: <h1>Emmyxiano </h1>
That codepen is importing react as a dependency (if you click the cog icon and look at the Pen Settings > JS, you can see react.development.js and react-dom.development.js being imported which your codepen isn't doing.
Again, a lot of that is npm / babel setup, which I why I keep recommending starting with the working hello world examples and then focusing on editing the code from there