Learn Something New Everyday,
Connect With The Best Developers!

Sign Up Now!

& 500k+ others use Hashnode actively.

Gytis Šk.'s photo

Hello Andrew!

Redux API is pretty much stable right now - I was wondering:

  • Is there is anything left to improve or add to Redux?
  • Can we except some new features in the future?
  • What do you think will be next thing after Redux (for state/app management)?
Dan Abramov's photo

There is 4.x branch hanging around that we never finished but that I hope to ship eventually. It almost doesn’t change user facing API but it in my opinion completes the extensibility design in Redux, fixing a few mistakes we made along the way.


After it lands, we should be able to make minor implements to the API like passing the state to subscribers, without hurting the extension ecosystem.

Honestly I don't expect Redux to move beyond that. There is value in maintaining backwards compatibility, and I don't think we've made too many mistakes anyway. I'm pretty happy with how Redux turned out to be, and I think its scope is well defined and closed.

Personally, I will be interested in making React component state more competitive with Redux. I'm also interested in declarative data fetching solutions like Relay. I hope that we can find a sweet spot between them and make React better with ideas from both.

Andrew Clark's photo

Front-end engineer at Facebook

Dan responded as I was typing my response. Happily we touched on many of the same points!

The not-so-secret thing about Redux is that, while the larger community has been and remains incredibly active, the core Redux library itself hasn't changed much at all since last summer. In my view, Redux is essentially complete. Most of the innovation around it will continue to come in the form of third-party extensions, including projects like Redux Saga and Redux Observable. There are a few things that I would still like for Redux to solve. One is to make it easier for Redux-like patterns to be used at the component level. It's likely that this problem is better solved at the React level; however, I think it'd be great if the wide ecosystem of existing Redux middleware and enhancers could be scoped to work for an individual component. We're actually pretty close to making this happen. I believe this PR is the only real blocker (related to the INIT action): https://github.com/reactjs/redux/pull/1702

The next thing for state management? Well first, I'd like for people to stop putting everything into their Redux store unnecessarily. I like to imagine the different types of application state as a spectrum. On one end is highly local state, things like animations or form input values. On the other end is cached representations of external data, e.g. fetched via GraphQL or REST. In the middle is state that doesn't necessarily correspond to a specific component's lifecycle, or is shared across multiple parts of an app. This middle bit is where Redux really excels. For local state, I'm excited about ways to make React component state more functional. MobX seems to be doing some good work here, though I must confess that I haven't used it extensively. On the other end, for managing external data, I'm extremely bullish on declarative data fetching solutions, especially Relay which I think is just fantastic. I encourage you to check out Relay if you haven't already!

Want to read more?

Browse featured discussions

© 2020 · Hashnode