We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 71e3d04 + e888b32 commit bae8ce9Copy full SHA for bae8ce9
packages/toolkit/src/entities/slice_creator.ts
@@ -85,14 +85,14 @@ const makeWrappedReducerCreator =
85
selectEntityState: (state: State) => EntityState<T, Id>,
86
) =>
87
<Payload>(
88
- reducer: (
+ mutator: (
89
state: EntityState<T, Id>,
90
action: PayloadAction<Payload>,
91
) => void,
92
): CaseReducerDefinition<State, PayloadAction<Payload>> =>
93
- reducerCreator.create<Payload>((state: State, action) =>
94
- reducer(selectEntityState(state), action),
95
- )
+ reducerCreator.create<Payload>((state: State, action) => {
+ mutator(selectEntityState(state), action)
+ })
96
97
export function createEntityMethods<
98
T,
0 commit comments