Skip to Content

Store

live A Redux-style reactive state container. Holds a single immutable state value and mutates it exclusively through a pure reducer function that maps the current state and a dispatched FrameAction to a new state.

Constructor

Store

Creates a store with an initial state and a pure reducer function.

ParameterDescription
initialStateThe initial state of the store.
reducerA pure function that takes the current state and a dispatched action and returns the next state. Must not be null.

Methods

Dispatch

Dispatches through the reducer, computing the next state and emitting it if it differs from the current state.

ParameterDescription
actionThe action to dispatch. Must not be null.
Last updated on