Adding Redux to React App Created with create-react-app

12 Aug 2016

Facebook recently released an extremely cool tool to get up and running with React super quickly: create-react-app. This is not only for beginners, but I’ve found that this can serve as great boilerplate for even seasoned React developers. They gave a great way to give full control back to the developer by running the eject script.

With that being said, I was interested to inject a basic implemenation of Redux into this out-of-the-box app created by create-react-app. I did just that (click here for the GitHub repository).

The repository consists of only two commits. The first commit is the out-of-the-box app generated by create-react-app (and then subsequently ejected by running npm run eject). And the second commit is the simple code that adds a basic Redux implementation to this app. It doesn’t do anything fancy, just allows adding people names to the Redux store and displaying that data in the React app.

Check it out, I know I’ll be using it as a quick reference to adding Redux to this implementation. create-react-app is a great way to generate the boilerplate, highly recommended!

Note: it is not required to eject the app with npm run eject in order to implement Redux. This is a personal preference step I’ve taken to take control of dependencies