Packages

@reduxjs/toolkit

2.13.0 · 29 Sep 2026MIT45.8M / weekRepositoryHomepagenpmAtom feed

Upgrading @reduxjs/toolkit From 1.9.7 to 2.0.0

1 release in betweenevery note read

Reading releases, release notes and advisories…

Other targets from 1.9.7Latest2.13.0
  1. 1.9.7yours
  2. 2.0.0target

Start here

Before you upgrade

Tick each one off as you go
  • breaking2.0.0
  • breaking2.0.0
  • breaking2.0.0
  • breaking2.0.0
  • breaking2.0.0
  • breaking2.0.0
  • breaking2.0.0
  • breaking2.0.0

Release by release

  1. 2.0.0

    Migration needed4 Dec 202324 new · 19 fixes
    • breaking

      Removes the deprecated object syntax from createSlice and createReducer

    • breaking

      Removes other deprecated options

    • breaking

      This release has breaking changes. (Note: v2.0.1 was released with a couple hotfixes for Reselect and Redux Thunk right as this was being finalized.)

    • 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.

62 other lines we could not sort, mostly version bumps
  • Updates the middleware and enhancers options of configureStore to require callbacks

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

    2.0.0
  • Includes all changes to Redux core 5.0, Reselect 5.0, and Redux Thunk 3.0

    2.0.0
  • Updates RTKQ default subscription behavior

    2.0.0
  • Has many additional TS tweaks and improvements

    2.0.0
  • It wasn't clear what the syntax for declaring a thunk inside should look like.

    2.0.0
  • Thunks have access to getState and dispatch, but the RootState and AppDispatch types are normally inferred from the store, which in turn infers it from the slice state types. Declaring thunks inside createSlice would cause circular type inference errors, as the store needs the slice types but the slice needs the store types. We weren't willing to ship an API that would work okay for our JS users but not for our TS users, especially since we want people to use TS with RTK.

    2.0.0
  • You can't do synchronous conditional imports in ES modules, and there's no good way to make the createAsyncThunk import optional. Either createSlice always depends on it (and adds that to the bundle size), or it can't use createAsyncThunk at all.

    2.0.0
  • In order to create async thunks with createSlice, you specifically need to set up a custom version of createSlice that has access to createAsyncThunk.

    2.0.0
  • You can declare thunks inside of createSlice.reducers, by using a "creator callback" syntax for the reducers field that is similar to the build callback syntax in RTK Query's createApi (using typed functions to create fields in an object). Doing this does look a bit different than the existing "object" syntax for the reducers field, but is still fairly similar.

    2.0.0

6 internal lines (docs, tests, tooling) left out.