Bump @reduxjs/toolkit from 1.8.6 to 1.9.0
Bumps @reduxjs/toolkit from 1.8.6 to 1.9.0.
Release notes
Sourced from @reduxjs/toolkit
's releases.
v1.9.0
This feature release adds several new options for RTK Query's
createApi
andfetchBaseQuery
APIs, adds a newupsertQueryData
util, rewrites RTKQ's internals for improved performance, adds a newautoBatchEnhancer
, deprecates the "object" syntax forcreateReducer
andcreateSlice.extraReducers
, deprecates and removes broken utils for getting running query promises, improves TS inference, exports additional types, and fixes a number of reported issues.npm i @reduxjs/toolkit@latest yarn add @reduxjs/toolkit@latest
We plan to start work on RTK 2.0 in the next few weeks. RTK 2.0 will focus on dropping legacy build compatibility and deprecated APIs, with some potential new features. See the linked discussion thread and give us feedback on ideas!
Deprecations and Removals
Object Argument for
createReducer
andcreateSlice.extraReducers
RTK's
createReducer
API was originally designed to accept a lookup table of action type strings to case reducers, like{ "ADD_TODO" : (state, action) => {} }
. We later added the "builder callback" form to allow more flexibility in adding "matchers" and a default handler, and did the same forcreateSlice.extraReducers
.We intend to remove the "object" form for both
createReducer
andcreateSlice.extraReducers
in RTK 2.0. The builder callback form is effectively the same number of lines of code, and works much better with TypeScript.Starting with this release, RTK will print a one-time runtime warning for both
createReducer
andcreateSlice.extraReducers
if you pass in an object argument.As an example, this:
const todoAdded = createAction('todos/todoAdded'); createReducer(initialState, { [todoAdded]: (state, action) => {} }) createSlice({ name, initialState, reducers: {/* case reducers here */}, extraReducers: { [todoAdded]: (state, action) => {} } })
should be migrated to:
createReducer(initialState, builder => { builder.addCase(todoAdded, (state, action) => {}) }) createSlice({ name, </tr></table>
... (truncated)
Commits
-
f7a8282
Release 1.9.0 -
2425f02
Merge pull request #2401 from reduxjs/v1.9-integration -
ed75be0
Merge pull request #2859 from reduxjs/feature/final-v1.9-tweaks -
5e4ad31
Bump dependencies -
8f30d43
Add TS 4.9 RC to the test matrix -
35f7e6d
Switch autobatch default method to 'raf' -
48fe9e1
Release 1.9.0-rc.1 -
fdc1c50
Merge pull request #2857 from reduxjs/feature/autobatch-timing -
f178b94
Make autobatching notification queueing configurable -
b12b22c
Merge branch 'master' into v1.9-integration - Additional commits viewable in compare view
Dependabot commands
You can trigger Dependabot actions by commenting on this MR
-
$dependabot rebase
will rebase this MR -
$dependabot recreate
will recreate this MR rewriting all the manual changes and resolving conflicts