How to use React and Redux on Codepen

I am just beginning to start my Front-End Libraries projects and would like to use React, Redux, and React-Redux, but I don’t know how to get them to work in the JavaScript editor. If anybody has any ideas as to how I can get this to work it would be much appreciated :slight_smile:

You would have to import the relevant libraries. That is a little different in CP, but if you go to a pen like this one you can see how they imported those libraries by going to Settings -> JS -> Add External Scripts. You will see 4 scripts there, that you need. You can get them by typing “react”, “react-dom”, “redux”, and “react-redux” into the search bar.

Using these in the CP world is a little different, but you can look at that example.

Hi @Jack02 !

You might also consider using codesandbox for this section.
They have react templates to use and you have the ability to create multiple files.

1 Like

Yeah, that is a big limitation of CP. React and especially redux like to work in different files. For a small program it can work, but as things get bigger, it gets confusing.

Thank you guys this has been a lot of help :slight_smile:

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