Home Reference Source

References

summary
public

F error(type: String): ActionCreator

Given a type, return a function that will pass it's argument as an error.

public

F noop(type: String): ActionCreator

Don't pass any information, just pass the type to the reducer.

public

F payload(type: String): ActionCreator

Given a type, create a function that accepts a payload and passes that with the given type.

public

F thunk(type: String, prom: Promise): ActionCreator

given a type and a promise creator, return an action creator that will accept the arguments to the promise, and on resolve, return a action.payload funciton.

public

F addError(state: *, action: *)

adds an error to the errors list of a piece of state

public

F asyncEnd(prop: String): Reduction

Given a prop, set the async start flag to false

public

F asyncStart(prop: String): Reduction

Given a prop, set the async start flag to true

public

F byType(init: State, typeObj: ReductionMap): Reducer

Create a reducer with an initial state, and a reduction map (from type to reduction)

public

F clearErrors(state: *)

resets the errors object back to the empty list.

public

F compose(reductions: ...Reduction): Reduction

given multiple reductions, combine them into a single reduction

public

F merge(state: State, action: Action): Reduction

Given a state and an action, merge the action's payload into the state.

public

F overwrite(prop: String): Reduction

given a prop, set the action's payload prop at state.prop