We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c088899 commit 8c53d58Copy full SHA for 8c53d58
src/entities/entity_state.test.ts
@@ -42,7 +42,12 @@ describe('Entity State', () => {
42
reducers: {
43
addOne: adapter.addOne,
44
removeOne(state, action: PayloadAction<string>) {
45
- return adapter.removeOne(state, action)
+ // TODO The nested `produce` calls don't mutate `state` here as I would have expected.
46
+ // TODO (note that `state` here is actually an Immer Draft<S>, from `createReducer`)
47
+ // TODO However, this works if we _return_ the new plain result value instead
48
+ // TODO See https://github.com/immerjs/immer/issues/533
49
+ const result = adapter.removeOne(state, action)
50
+ return result
51
}
52
},
53
extraReducers: builder => {
0 commit comments