Rendering React-Redux in CodePen

I am looking to do the Random Quote Generator project in React-Redux and I can’t get it to render.

I still have work to complete the various user stories and add styling, but would like feedback on how to correct code in order to render my program.

I’ve looked at previous answers and tried applying a few ideas but have not yet success yet.

Here is my code. I have added the external scripts in JS for react, redux and react-redux.
https://codepen.io/adcb/pen/zYGZZbr

I am also getting a recurring uncaught syntax error on line 61, but if I retype the opening bracket ("<") it seems to correct it until the next time it tries running it. I’ve looked through my code a few times and don’t understand why it believes it to be a syntax error.

Any help would be appreciated. Thanks.

You need to set your preprocessor to Babel, I don’t know if it’s the only thing missing, but that would be a big reason for which you get syntax errors for React

I’m doing a course from the blog. In codepen I have to use react dom as well. iealeen is right also. Here’s a post from Chuck in 2019. Getting started with react on codepen - #2 by chuckadams
So in the js settings (the gear icon) you should link to react,react dom, and babel. Read the post I linked to.
It is interesting to note that playgrounds are just HTML form text boxes that through JS magic get built into a webpage presented in an i-frame. So you should set things in the settings (behind the gear icon) for every project then things get put in their proper places on final assembly.

Thanks for both your help. Along with a few typos corrected, I successfully rendered the program!

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