We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48a2381 commit c9d6a45Copy full SHA for c9d6a45
modules/store/src/state.ts
@@ -57,9 +57,10 @@ export type StateActionPair<T, V extends Action = Action> = {
57
action?: V;
58
};
59
export function reduceState<T, V extends Action = Action>(
60
- { state }: StateActionPair<T, V> = { state: undefined },
+ stateActionPair: StateActionPair<T, V> = { state: undefined },
61
[action, reducer]: [V, ActionReducer<T, V>]
62
): StateActionPair<T, V> {
63
+ const { state } = stateActionPair;
64
return { state: reducer(state, action), action };
65
}
66
0 commit comments