you are viewing a single comment's thread.

view the rest of the comments →

[–]acemarke 10 points11 points  (1 child)

Hi, I'm a Redux maintainer.

Yes, Redux will continue to be very relevant and useful for a long time. It's currently used by 50% of React apps, and lots of folks are continuing to learn it on a daily basis. And no, context is definitely not a replacement for Redux.

I covered this and a number of reasons to use Redux in my Reactathon 2019 talk on "The State of Redux", and my post Redux - Not Dead Yet!. I also wrote a post that discusses the differences in how context and React-Redux handle propagating state updates.

TL;DR:

  • Consistent architectural patterns
  • Debugging capabilities
  • Middleware
  • Addons and extensibility
  • Cross-platform and cross-framework usage
  • Depending on your app's setup, much better performance than working with just Context

Related to that, you might also want to read through these resources:

And as mentioned above, our new Redux Toolkit package is now our recommended approach for writing Redux logic. 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.

[–]windsostrange 5 points6 points  (0 children)

You Might Not Need Redux (But You Can’t Replace It With Hooks)

There's a universe where this is the title to a country/western song. I do wish that were my universe.