an interactive course on Educative.io!
Check out the course announcement post for more details.
"Redux Fundamentals" workshop in New York City on April 19-20. Tickets still available!
Advice and resources for getting started with Redux
Our recommendation is to focus on learning React itself very well first. Once you have a good grasp on React, you'll have a better understanding of why a state management library like Redux can be useful. Also, while Redux is simple in some ways, it can be complex in others, and it definitely can have a steep-ish learning curve depending on your background.
Redux generally doesn't seem very useful with small or toy apps. The typical example is a Todo list, but that's just to illustrate the basic mechanics and data flow. At that level, the benefits of Redux aren't very apparent, and the amount of overhead will definitely seem large.
If you're not sure whether you should learn Redux yet, here's some suggested resources:
- Robin Wieruch has a great post called 8 things to learn in React before using Redux. He also wrote a list of Tips to learn React + Redux in 2017.
- The Redux FAQ has an entry on When should I use Redux?. The FAQ entry points to several other quotes about when you might want to use Redux, and specifically three related articles:
- Dan Abramov's post The Case for Flux, which describes when a Flux-like library is useful in general
- Dan later wrote a post called You Might Not Need Redux, which talks about the tradeoffs Redux asks you to make, and the benefits you get in return. He also emphasizes that it doesn't fit every use case.
- I co-wrote a post on reasons why Redux can be useful in a React app
Once you are ready to learn Redux, start with the official docs at http://redux.js.org/ , and watch Dan Abramov's tutorial videos on Egghead.io. I also have an Intro to React and Redux slideshow, which gives an overview of the basic concepts for both.
From there, my React/Redux links list has a large section of Redux tutorials, as well as sections on Redux Reducers and Selectors, Redux Architecture, and Redux Side Effects, and a lot more.
Since there's a lot of articles in my list, I'll highlight a few:
- Dave Ceddia's posts What Does Redux Do? (and when should you use it?) and How Redux Works: A Counter-Example is a great intro to the basics of Redux and how to use it with React, as is this post on React and Redux: An Introduction
- Valentino Gagliardi's post React Redux Tutorial for Beginners: Learning Redux in 2018 is an excellent extended introduction to many aspects of using Redux
- The CSS Tricks article Leveling Up with React: Redux covers the Redux basics well
- This DevGuides: Introduction to Redux tutorial covers several aspects of Redux, including actions, reducers, usage with React, and middleware.
If you want to see how Redux fits into a somewhat larger application, I can recommend this 8-part "Build a Simple CRUD App with React and Redux" series, and my own "Practical Redux" tutorial series.
And finally, my "Idiomatic Redux" series has articles that go deeper into different Redux usage patterns, the history and intent behidn Redux's design, and what I consider to be the right ways to use Redux.
This is a post in the Blogged Answers series. Other posts in this series: