I’ve been working on the Front End Libraries projects over the last couple weeks and I’ve been kinda stumped on why my code wont render. I think I have the ReactDOM.render done correctly, but if that is the case I don’t know what I did wrong that it wont render. My codepen is here: https://codepen.io/AugustTGuenther/pen/GRomxqG. Any help or advice is greatly appreciated. I’ll be watching this thread relatively closely so I can answer questions.
Some things to note when using CodePen:
- CodePen does not expect any content outside the
scriptinformation must be put in the settings section of the HTML editor.
- You do not need to/cannot link the CSS in your HTML, if you place the CSS in the appropriate section.
- If your project uses React, use the Babel preprocessor, and link the CDN in the appropriate section.
- The editors offer the ability to format and analyze your code, providing useful information about forgotten closing tags etc.
You need to add the React and ReactDOM libraries to your project.
If you are still confused with how to use CodePen, please read the official documentation.
Hope this helps
It looks like you don’t have React imported at all. You can use this CodePen (from the official React tutorial) to compare settings: https://codepen.io/gaearon/pen/oWWQNa
Thank you so much for your reply, I didn’t really understand what importing react meant exactly or how it would be done since the curriculum doesn’t really go over it much.
This is not correct:
I suggest you Google that, and see what comes up…
Literally noticed that exactly as you typed it back, duh!! Thank you!!