Big changes afoot in the React/Redux ecosystem

  • If you’re using React and / or Redux, you should be aware of two major changes coming soon in each of those libraries.
  • In addition to the upcoming change in Redux, React has seen some major changes as well.
  • First, the new Context API was proposed and landed, the first major change using React’s new RFC process.
  • Once it comes out from behind that flag, you’ll be able to use Context in your applications, knowing that this is a stable API you can rely on.
  • The reason for this major change is they’ve found these lifecycle methods could be potentially unsafe in an async world, so they’re suggesting moving most of the logic previously implemented in the methods to either or the method itself.

First, Redux just released v4.0.0-beta.1. There doesn’t appear to be any major changes breaking changes unless you were using some of the types Redux is no longer exporting. There are also some additional checks and errors around dispatching too early in middleware, so it should solve a common pitfall when setting up middleware. It’s a problem I’ve experienced a few times when using brookjs and it’s why we recommend dispatching an INIT action after the application is bootstrapped.

If you’re using React and / or Redux, you should be aware of two major changes coming soon in each of those libraries.

First, Redux just released v4.0.0-beta.1. There doesn’t appear to be any major changes breaking changes unless you were using some of the types Redux is no longer exporting. There are also some additional checks and errors around dispatching too early in middleware, so it should solve a common pitfall when setting up middleware. It’s a problem I’ve experienced a few times when using and it’s why we recommend dispatching an action after the application is bootstrapped.

In addition to the upcoming change in Redux, React has seen some major changes as well. First, the new Context API was proposed and landed, the first major change using React’s new RFC process. The Context API has always been considered somewhat experimental, although it’s been used widely by a number of libraries, including react-redux and react-router, and the current implementation ran into a number of challenges. The biggest is will tell React that none of the elements of a given hierarchy has changed. If a component in that hierarchy would change as a result of a change in context, that change isn’t able to propagate down the tree.

The new API uses higher-order components to set and provide a Context. It uses a render function as a prop to provide the value of the Context,…

Big changes afoot in the React/Redux ecosystem