I'm really struggling to find any documentation or guides about how to use Redux with CRA
See original GitHub issueHello!
I’ve just been searching through this project’s README, the create-react-app website and documentation, the Redux website, and a few Google searches, and I can’t seem to find any guides or documentation about how I can use a Redux “template”, or set up some boilerplate for a Redux store/reducers/etc.
I also installed create-react-app
with npm install -g create-react-app
and ran create-react-app --help
, and I can’t see any information about “plugins”, or custom templates, or anything like that.
Then I stumbled onto this GitHub issue, with this comment: “CRA supports both redux and graphql.”
Do they just mean that you’re free to add Redux to your own package.json
and then set everything up manually? Or is there an “official” way of setting up some boilerplate code and installing dependencies?
I could have sworn I remember reading a tweet about Redux + CRA, maybe from Dan Abramov, or one of the Redux maintainers. But now all I’m finding on Google are a few Medium posts, and a lot of “boilerplate” repos from random developers. It would be great if there was an official create-react-app
integration/plugin for Redux, and if a link to this could be included somewhere in the project README, or on the website.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
I think you may be overestimating how much you need to do to “set up Redux” 🙂
You can clone any project in the
examples
folder of the Redux repo. They’re bootstrapped with CRA.Awesome, thanks! That’s really great. I’ve used Flow on a few different projects but am excited to try TypeScript.
Haha sorry, I’m just lazy. This is probably my fifth or sixth React + Redux project, but the ecosystem moves so fast that I wanted to start from scratch and use the latest versions of everything. I didn’t want to base it on one of my existing projects, because they’re all still on Webpack 2 or 3, and I’ve actually never used create-react-app before.
Yeah, I just remember reading a few comments saying that Semantic UI can be tricky to set up with webpack, so I thought I’d rather get a preconfigured Semantic UI and set up Redux by myself.
I’ve actually decided to use Ant Design for this project, because it’s written with TypeScript, has a really complete set of UI components, and they have a really good guide for getting started with create-react-app.
I might even use the new React hooks as well, and will see if I can just skip Redux. It’s a toy weekend project, so will be a great chance to learn lots of new things and try to keep up with everything.