Reducer

object Reducer
Deprecated
class Object
trait Matchable
class Any
Reducer.type

Value members

Concrete methods

def apply[A, M](f: (M, A) => M): A => M

Creates a reducer which just transforms the state, without additional effects.

Creates a reducer which just transforms the state, without additional effects.

def withEffects[F[_] : ObservableLike, A, M](f: (M, A) => (M, F[A])): A => M

Creates a Reducer which yields a new State, as-well as an Observable of Effects Effects are Actions which will be executed after the Action that caused them to occur. This is accomplished by subscribing to the Effects Observable within the stores scan loop.

Creates a Reducer which yields a new State, as-well as an Observable of Effects Effects are Actions which will be executed after the Action that caused them to occur. This is accomplished by subscribing to the Effects Observable within the stores scan loop.

CAUTION: There is currently a bug which causes the Effect-States to emit, before the State of the action that caused the effects is emitted. However, this only effects immediate emissions of the Effects Observable, delayed emissions should be fine.

Value parameters:
f

The Reducing Function returning the (Model, Effects) tuple.

def withOptionalEffects[F[_] : ObservableLike, A, M](f: (M, A) => (M, Option[F[A]])): A => M

Creates a Reducer with an optional effect.

Creates a Reducer with an optional effect.