Skip to content

Commit

Permalink
Merge pull request #3364 from reduxjs/bugfix/autobatch-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Apr 17, 2023
2 parents cc9d416 + a9057c6 commit 2282f60
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
6 changes: 3 additions & 3 deletions packages/toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@
"query"
],
"dependencies": {
"immer": "^9.0.16",
"redux": "^4.2.0",
"immer": "^9.0.21",
"redux": "^4.2.1",
"redux-thunk": "^2.4.2",
"reselect": "^4.1.7"
"reselect": "^4.1.8"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18",
Expand Down
7 changes: 5 additions & 2 deletions packages/toolkit/src/query/core/buildSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,11 @@ export function buildSlice({
name: `${reducerPath}/internalSubscriptions`,
initialState: initialState as SubscriptionState,
reducers: {
subscriptionsUpdated(state, action: PayloadAction<Patch[]>) {
return applyPatches(state, action.payload)
subscriptionsUpdated: {
reducer(state, action: PayloadAction<Patch[]>) {
return applyPatches(state, action.payload)
},
prepare: prepareAutoBatched<Patch[]>(),
},
},
})
Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6361,7 +6361,7 @@ __metadata:
eslint-plugin-react: ^7.23.2
eslint-plugin-react-hooks: ^4.2.0
fs-extra: ^9.1.0
immer: ^9.0.16
immer: ^9.0.21
invariant: ^2.2.4
jest: ^27
json-stringify-safe: ^5.0.1
Expand All @@ -6371,9 +6371,9 @@ __metadata:
node-fetch: ^2.6.1
prettier: ^2.2.1
query-string: ^7.0.1
redux: ^4.2.0
redux: ^4.2.1
redux-thunk: ^2.4.2
reselect: ^4.1.7
reselect: ^4.1.8
rimraf: ^3.0.2
rollup: ^2.47.0
rollup-plugin-strip-code: ^0.2.6
Expand Down Expand Up @@ -16263,10 +16263,10 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"immer@npm:^9.0.16":
version: 9.0.16
resolution: "immer@npm:9.0.16"
checksum: e9a5ca65c929b329da7a3b7beccf7984271cda7bdd47b2cab619eac3277dcd56598c211b55cc340786b6eff0c06652ac018808d9fd744443f06882364dece6bc
"immer@npm:^9.0.21":
version: 9.0.21
resolution: "immer@npm:9.0.21"
checksum: 70e3c274165995352f6936695f0ef4723c52c92c92dd0e9afdfe008175af39fa28e76aafb3a2ca9d57d1fb8f796efc4dd1e1cc36f18d33fa5b74f3dfb0375432
languageName: node
linkType: hard

Expand Down Expand Up @@ -23557,12 +23557,12 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"redux@npm:^4.2.0":
version: 4.2.0
resolution: "redux@npm:4.2.0"
"redux@npm:^4.2.1":
version: 4.2.1
resolution: "redux@npm:4.2.1"
dependencies:
"@babel/runtime": ^7.9.2
checksum: 75f3955c89b3f18edf5411e5fb482aa2e4f41a416183e8802a6bf6472c4fc3d47675b8b321d147f8af8e0f616436ac507bf5a25f1c4d6180e797b549c7db2c1d
checksum: f63b9060c3a1d930ae775252bb6e579b42415aee7a23c4114e21a0b4ba7ec12f0ec76936c00f546893f06e139819f0e2855e0d55ebfce34ca9c026241a6950dd
languageName: node
linkType: hard

Expand Down Expand Up @@ -24011,10 +24011,10 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"reselect@npm:^4.1.7":
version: 4.1.7
resolution: "reselect@npm:4.1.7"
checksum: 738d8e2b8f0dca154ad29de6a209c9fbca2d70ae6788fd85df87f2c74b95a65bbf2d16d43a9e2faff39de34d17a29d706ba08a6b2ee5660c09589edbd19af7e1
"reselect@npm:^4.1.8":
version: 4.1.8
resolution: "reselect@npm:4.1.8"
checksum: a4ac87cedab198769a29be92bc221c32da76cfdad6911eda67b4d3e7136dca86208c3b210e31632eae31ebd2cded18596f0dd230d3ccc9e978df22f233b5583e
languageName: node
linkType: hard

Expand Down

0 comments on commit 2282f60

Please sign in to comment.