Packages

redux

5.0.1 · 23 Dec 2023MIT62.6M / weekRepositoryHomepagenpmAtom feed

Upgrading redux From 4.2.1 to 5.0.1

2 releases in betweenevery note read

Reading releases, release notes and advisories…

  1. 4.2.1yours
  2. 5.0.0major
  3. 5.0.1target
10
changes to make
0
advisories fixed
0
new
2
fixes

Start here

Before you upgrade

Tick each one off as you go
  • breaking5.0.0
  • breaking5.0.0
  • breaking5.0.0
  • breaking5.0.0
  • deprecated5.0.0
  • deprecated5.0.0
  • deprecated5.0.0
  • deprecated5.0.0
  • deprecated5.0.0
  • deprecated5.0.0

Release by release

  1. 5.0.1

    23 Dec 20232 fixes
    • fixed

      isPlainObject: Support check Object.create(null)

    • fixed

      types/store: Unexpectedly narrowed return type of function Store['getState']

  2. 5.0.0

    Migration needed4 Dec 2023
    • breaking

      Removes the PreloadedState type in favor of a new generic argument for the Reducer type.

    • breaking

      This release has breaking changes.

    • breaking

      For full details on all of the breaking changes and other significant changes to all of those packages, see the "Migrating to RTK 2.0 and Redux 5.0" migration guide in the Redux docs.

    • breaking

      Strictly speaking, this is not a breaking change, nor is it new in 5.0, but we're documenting it here for completeness.

8 other lines we could not sort, mostly version bumps
  • Converts the codebase to TypeScript

    5.0.0
  • Updates the packaging for better ESM/CJS compatibility and modernizes the build output

    5.0.0
  • Requires that action.type must be a string

    5.0.0
  • next would be typed to have all of the dispatch extensions, including the ones earlier in the chain that would no longer apply.

    5.0.0
  • action is not necessarily a known action, it can be literally anything - for example a thunk would be a function with no .type property (so AnyAction would be inaccurate)

    5.0.0
  • The Reducer, ReducersMapObject, and createStore/configureStore types/function take an additional PreloadedState generic which defaults to S.

    5.0.0
  • The overloads for combineReducers are removed in favor of a single function definition that takes the ReducersMapObject as its generic parameter. Removing the overloads was necessary with these changes, since sometimes it was choosing the wrong overload.

    5.0.0
  • Enhancers that explicitly list the generics for the reducer will need to add the third generic.

    5.0.0