v2.1.0
This minor release:
- adds withTypes methods to
listenerMiddleware
andcreateDraftSafeSelector
- adds a
skipPollingIfUnfocused
option to RTK Query - adds the ability to customise the
createSelector
instance used by RTK Query - reworks slice selector logic to avoid depending on
this
value - fixes the order and inference of
create.asyncThunk
type parameters - fixes requirements for meta fields returned from
queryFn
s - marks promises that will never reject as safe, in preparation for typescript-eslint/typescript-eslint#7008
What's Changed
- Update docs to avoid circular type by @EskiMojo14 in #3948
- Copy "Migrating to Modern Redux" and "RTK is Redux" docs from core site by @markerikson in #3956
- Fix store path rtk-query pokemon api tutorial by @suspiciousRaccoon in #3611
- tweak RTKQ without hooks section, and add note regarding memoization by @EskiMojo14 in #3963
- Add section regarding overriding deps by @EskiMojo14 in #3968
- Add section re: RR custom context typing change by @EskiMojo14 in #3995
- Add Expo demo app to CI workflow by @aryaemami59 in #3985
- docs: fix a typo in queries markdown file by @fatihgnc in #4013
- Preserve nullable store state type by avoiding intersection with {} by @EskiMojo14 in #4011
- Upgrade version of "graphql-request" by @phryneas in #4026
- [graphql-request-base-query] update RTK peerDependency by @phryneas in #4027
- fix: improve selectFromResult memoization by @thisjeremiah in #4029
- Rename "createSliceWithThunks" and "createThunkSlice" to "createAppSlice" by @EskiMojo14 in #4035
- Bump Vitest to latest version by @aryaemami59 in #4047
- fix inference and order of async thunk generics by @EskiMojo14 in #4061
- Fix markdown links on Next.js page by @DmitryScaletta in #4069
- Introduce pre-typed listener middleware via
listenerMiddleware.withTypes<RootState, AppDispatch>()
method by @aryaemami59 in #4049 - Add
.withTypes
tocreateDraftSafeSelector
by @aryaemami59 in #4080 - Task/remove all settled by @bever1337 in #3917
- Allow customising createSelector instance used by RTKQ by @EskiMojo14 in #4048
- cacheLifecycle fix for fixedCacheKey in mutationThunk by @riqts in #4082
- avoid relying on
this
in createSlice by @EskiMojo14 in #4071 - documentation: fix grammar in redux and redux toolkit comparison by @untilhamza in #4086
- Update
tsconfig.typetests.json
to include all TS files by @aryaemami59 in #4091 - Remove abort event listner for AbortController by @Fonger in #3951
- Docs: unused value 'isRejected' in code snippet by @alphonsotran in #3301
- fix/kitchen-sink-isAuthenticated: fixed isAuthenticated state change on login fullfilled by @shrijan00003 in #3588
- Fix
composeWithDevTools
spy by @aryaemami59 in #4093 - require queryFn meta to match base query by @EskiMojo14 in #4098
- Added 'SafePromise' branded Promises for createAsyncThunk by @JoshuaKGoldberg in #4102
- Add React Native demo app to CI workflow by @aryaemami59 in #3984
- Modernize unit test setup by @aryaemami59 in #4114
- Add missing reducer field to ConfigureStoreOptions docs by @nickgirardo in #4116
- Option for queries to pause polling when unfocused by @riqts in #4055
New Contributors
- @suspiciousRaccoon made their first contribution in #3611
- @fatihgnc made their first contribution in #4013
- @thisjeremiah made their first contribution in #4029
- @riqts made their first contribution in #4082
- @untilhamza made their first contribution in #4086
- @Fonger made their first contribution in #3951
- @alphonsotran made their first contribution in #3301
- @shrijan00003 made their first contribution in #3588
- @JoshuaKGoldberg made their first contribution in #4102
- @nickgirardo made their first contribution in #4116
Full Changelog: v2.0.1...v2.1.0