Reducer

Type Alias Reducer 

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

A reducer function that handles actions and mutates state

Returns true if the state changed and a re-render is needed.