Skip to main content

Reducer

Type Alias Reducer 

Source
pub type Reducer<S, A, E = NoEffect> = fn(&mut S, A) -> ReducerResult<E>;
Expand description

A reducer function that handles actions and mutates state

Returns a ReducerResult containing the state change flag and any effects emitted by the action.