CreateSlice()
Signature
createSlice: <S, R extends ReducerMap<S, any>>({
initialState,
reducers
}: CreateReducerParams<S, R>) => {
initialState: S;
reducer: void | S extends ValidRecipeReturnType<S> ? (base: Immutable<S>, action: ActionsByMap<S, R>) => S : never;
}
Parameters
Parameter | Type | Description |
---|---|---|
{ initialState, reducers} | CreateReducerParams<S, R> |
Returns
{ initialState: S; reducer: void | S extends ValidRecipeReturnType<S> ? (base: Immutable<S>, action: ActionsByMap<S, R>) => S : never; }