reduce

abstract fun reduce(state: S, action: A, effectIdSource: EffectIdSource): Reduction<S, A>

Computes the next Reduction from the current state and the received action.

Return

A Reduction containing the new state and any Reactions (effects, actions, or cancellations).

Parameters

state

The current state of the Store.

action

The incoming action describing an event from the outside world.

effectIdSource

A source for generating unique EffectIds for new effects.