Packages

@reduxjs/toolkit

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

Your version

1.9.1

30 Nov 2022Where it was published

1.9.7 is the newest release of 1.x.

In short

3 fixed4 changed

Release note

This bugfix release fixes assorted issues that were reported with RTK 1.9.0, and adds a few additional requested tweaks and improvements.

Changelog

Fixes

The createAsyncThunk.withTypes function was fully broken (it type-checked correctly, but pointed to the wrong function due to a name shadowing issue). That now works correctly.

The maxRetries option for RTKQ was inadvertently filtering out 0 values, and those are now accepted.

fulfillWithValue had incorrect types that made it appear as if the data was nested an additional level deeper. The types are now correct.

The ActionCreatorWithoutPayload type was tweaked to force an error when an action creator is accidentally called with an argument, which happens in cases like onClick={todoAdded}. This avoids accidentally passing values like React event objects as the payload.

Timer handling for batchActions and autoBatchEnhancer now works in more JS runtime environments.

Other Changes

The TagDescription type is now exported from RTKQ.

API endpoints now have a .name field containing the endpoint name, such as "getPokemon".

Calling promise.abort() on a createAsyncThunk promise before an async condition resolves will now be treated as if the condition itself returned false, bailing out and not dispatching anything.

The merge option now receives a third argument containing {arg, baseQueryMeta, fulfilledTimeStamp, requestId}, in case that info is useful in deciding how to merge.

The @reduxjs/rtk-codemods package has been updated to fix cases where the createSliceBuilder codemod didn't preserve fields with function variable arguments, like [todoAdded]: adapter.addOne. That package has been updated to v0.0.3.

What's Changed

  • Fix createAsyncThunk.withTypes

  • Update timer polyfills to work in more environments

  • Retry now checks whether potential retry counts are undefined, rather than boolean, in order to avoid filtering out 0's

  • Fix multiple small issues with 1.9

  • fulfillWithValue should infer return value

  • Fix Identifier/MemberExpression values in createSliceBuilder codemod

  • Additional 1.9.1 fixes