Codepen setup for React/Redux

Hi all ! :slight_smile:

I’ve been trying to setup my codepen to use react/redux but have some trouble.

While I took the front-end libraries course I could follow along while testing code in a fiddle, or with create-react-app .

But was never able to setup a fiddle to use both react/redux. Or now setting up a codepen.

I’m getting this error: Uncaught ReferenceError: React is not defined

I added the following cdns to the js settings :

With create-react-app and following along with tutorials they explained which import statements were needed and where.
With a codepen some of it is already processed behind the scenes .

I have very little code so far , just some html and an empty react class:
class RandomQuote extends React.Component {

constructor(props) {
this.state = {

    this.NewQuote = this.NewQuote.bind(this)


So I’m unsure what I’m missing and where to add it.
Thanks! :grinning:

Hey there!

I think codesandbox does a better job for React, because you will have a real file/folder structure and this is how you will work in real React projects.

Looking forward to seeing it!

1 Like