How to setup React in code pen

Tell us what’s happening:

Hi , I would like to get started with my project but unsure how to get react setup, I have searched google which says go to settings in code pen, select js, type in react and then select react and react dom in add external scripts

I did this here but cannot get anything to render and there is an error in the js, can you let me know how to fix it please?

Your code so far

Your browser information:

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

Challenge: Build a Random Quote Machine

Link to the challenge:

In codepen you don’t import anything. You add react and react-dom in settings and then use them. Same with any other package that you would normally import.

So just remove both imports and everything will work.


Thanks so much, I appreciate the response, it is working fine now like you said!