This release is a small bugfix update for RTK Query and the surrounding types. It also pulls in a few user-visible improvements around infinite queries, codegen, and state checks.
What's new
TypedUseInfiniteQueryHookResultnow includesfetchNextPageandfetchPreviousPage, so the helper type matches the infinite query hook result more completely. (#5165)refetchCachedPagesadds a way to keep infinite query caches from refetching every cached page on refetch. It defaults to the existing behavior, and you can set it tofalseininfiniteQueryOptionswhen you want to opt out. (#5016)- RTK Query codegen now supports explicit
providesTagsandinvalidatesTagsoverrides without changing the inferred defaults, and it avoids emitting empty tag arrays when tag generation is disabled. (#5135) - Codegen can also output regex patterns for generated schemas, which extends support for OpenAPI setups that rely on pattern-based schema matching. (#5146)
immutableChecknow compares paths againstRegExpinstances inignoredPaths, which makes dynamic ignore rules work as expected. (#5124)
Breaking changes
Immersupport in the typecheck matrix now drops TypeScript versions below 5.4. If you are still on an older TS release, you will need to upgrade to a supported version. (#5155)
Fixes
AbortSignalhandling now falls back to a plainErrorwhenDOMExceptionis not available, which avoids crashes in environments like React Native. (#5161)combineSlicesnow infersPreloadedStatecorrectly for provided slices whose reducers can receive a different state shape than they return, such as reducers wrapped withpersistReducer. (#5125)- The SSR window access regression from the earlier
setupListenersbyte-shaving work has been reverted. (#5132)
Other notable changes
- Immer was updated, and RTK now opts out of
strictIterationfor reducer updates. That change is intended to improve iteration behavior in normal Redux usage. (#5127, #5141) - The release and publishing workflows were hardened for trusted publishing, including pinned GitHub Actions and NPM tag support. (#5152)
- TypeScript support is now officially documented, and the typecheck matrix was updated to include a native TS preview job. (#5158, #5155)
- Several internal bundle-size and perf-oriented cleanups landed, including import deduplication,
setupListenersdeduping, and faster tag invalidation/update paths. (#5128, #5129, #5126)
Contributors
@EskiMojo14
@markerikson
@johnste
@CO0Ki3_
@w3di
@rossmartin
@RhysOnlyBetter