@reduxjs/toolkit
2.13.0 · 29 Sep 2026MIT45.8M / weekRepositoryHomepagenpmAtom feed
2.13.0 is the newest release of 2.x.
In short
9 new4 fixed21 changed3 internal
Release note
This minor release:
Adds a second parameter to
entityAdapter.getInitialState(additionalProps, entities)to allow prefilling stateEquivalent to
entityAdapter.setAll(entityAdapter.getInitialState(additionalProps), entities)First parameter can be
undefinedif no additional properties are desired
Allows initialising
combineSliceswith no static reducersPreviously
const combinedReducer = combineSlices().withLazyLoadedSlices<LazyLoadedSlices>()would have thrown an errorNow returns a "no-op" reducer that just returns an empty object until first reducer injected
Allows a new
'throw'value foroverrideExistingininjectEndpoints, which throws an error if a definition is injected with a name which is already usedExports more type helpers for RTKQ hook and trigger types
Exports types related to overriding result types in
enhanceEndpointsFixes state inference for injected slices when undeclared (i.e. not in
LazyLoadedSlices)Adds a
action.meta.arg.isPrefetchvalue to query thunk actions when prefetched
What's Changed
Revamp type tests setup
Bump Prettier and Prettier related packages
Fix codemods to work with TypeScript 4.7+
Export types related to overriding the result types
Migrate type tests to Vitest
Fix RetryOptions type test by flipping order
Format all files
skipPollingIfUnfocused added to polling overview and query options
Temporarily revert node-fetch bump until ESM issues are sorted
Contributing Markdown Refresh
Investigate re-adding size limit action
Add size limit imports for more commonly used RTK exports
Pure some things
Cut back on suffixes tested for size
Incorrect builder method referenced
Rename
cli.jstocli.mjsFix wrong state for injected slices when not declared via
withLazyLoadedSlices: add missing setOne and setMany signature
Corrected the "Observing cache behaviour" example point no.4
Add isPrefetch property in query action
Allow initialising combined slice reducer with no static slices
Create more Typed wrappers for RTKQ hook types
Proposal fix for axios base query types
Provide 'throw' option for
overrideExistingUse vite-tsconfig-paths to make path aliasing easier
Remove trailing commas in
tsconfig.jsonfiles of all CodesandBox examplesAdd second parameter to getInitialState to prefill entities