DEV Community

Discussion on: Should You Learn Redux?

Collapse
 
markerikson profile image
Mark Erikson

Hi, I'm a Redux maintainer. I know you know my opinion already, but I wanted to pop in and offer my thoughts for anyone else reading this post.

First, related to the "Redux is dead" meme: I specifically addressed this in my Reactathon 2019 talk on "The State of Redux" and my post Redux - Not Dead Yet!. The TL;DR version is:

  • Redux is still widely used (50% of React apps), and overall usage is still growing
  • There are definitely lots of other options (context+hooks, GraphQL, MobX, etc) that overlap with how you'd use Redux, and that means you don't need to use it all the time the way you maybe would have before
  • But, there's also lots of good reasons to choose to use Redux
  • Overall, the important thing for any project is to know what your needs and use cases are, evaluate the tradeoffs for each option, and deliberately pick the tool that makes the most sense for that app.

Specifically to the common question of "do hooks/context kill Redux?", see these additional articles:

I do think that almost everyone should learn Redux. Not only will you probably run across projects that use it, but understanding how it works and how to use it will definitely have a major effect on how you approach solving problems.

Per your comments on the docs and Reselect/Immer:

Folks should check out our new official Redux Starter Kit package. It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creating entire "slices" of state at once without writing any action creators or action types by hand. It's powered by Immer inside, includes Reselect, and is our recommended default approach for writing Redux logic:

redux-starter-kit.js.org

And finally, we're starting a major rewrite of the Redux core docs. It'll be a long-term effort, but I think we can make the docs better and easier to understand.

Hopefully that helps add some clarity. If anyone has questions, ask away!

Collapse
 
mercatante profile image
Steven Mercatante

Hi Mark, thanks for chiming in!

Overall, the important thing for any project is to know what your needs and use cases are, evaluate the tradeoffs for each option, and deliberately pick the tool that makes the most sense for that app.

^ A million times, this.

Thanks for mentioning Redux Starter Kit; I should've included that in this post.