Skip to content

Upgrading react-redux 6 to 7

Breaking6.0.1 → 7.2.9Breaking7Platform4New13Changed22Fixed18Other21

BreakingUpgrade verdict

7 breaking changes and 4 platform requirement changes.

  • Removes `useRedux`.
  • Removes `useActions`.
  • Removes the `deps` argument.
  • The useActions() helper is gone. Use useDispatch() to get dispatch, then call dispatch with your action creators yourself.
Top 5 of 11 that need code or config changes

Adds @types/react-redux ^7.1.20.

Drops invariant.

Installs 14 packages in all (was 8).

Breaking7
Removes useRedux.
useRedux
Removes useActions.
useActions
Removes the deps argument.
Removes the useActions() hook; call useDispatch() and dispatch action creators manually instead.
useActions()useDispatch()dispatch()
Removes the useRedux() hook because it does not provide benefits.
useRedux()useSelector()useActions()
Requires React 16.8.4 or higher as a peer dependency, up from 16.4.
Updates the React peer dependency from 16.4 to 16.8.4, the only public breaking change.
Platform4
Updates React-Redux v7 peer dependencies to accept React 18, only to avoid NPM peer dependency installation errors.
Upgrades the react peer dependency to v17, allowing React Redux to be used with React 17 without an install warning.
Marks the React renderers as optional peer dependencies.
Lowers the React peer dependency to ^16.8.3 to allow better usage with React Native 0.59.
react