reducer

Given the current state and an event, reduces the event to a new state and a list of effects.

Parameters

state

the current state.

event

the event to reduce.