Skip to content

Latest commit

 

History

History
160 lines (114 loc) · 11.5 KB

api.md

File metadata and controls

160 lines (114 loc) · 11.5 KB

Functions

simpleAction()ActionCreator
An action creator with no payload.
payloadAction()ActionCreator
An action creator with a typed payload.
handlerAction(handler)ActionCreator
An action creator with a handler function payload.
actionFactory(actionParts, reducer)ActionFactory
Fills in the type and reducer parameters on an an object values are action creators (see: simpleAction, payloadAction, handlerAction.
reductser(initialState, actionParts, reducer)ReductserCreator
Create a reductser, to be supplied as values on an object supplied to a reductserFactory.
reductserFactory(reducerParts)ReductserFactory
Returns the scoped actions and reducers from a map of reductsers.

Typedefs

ActionCreatorobject
An intermediate type used by actionFactory
ActionFactory
An object whose values create actions.
ReductserCreator
An intermediate type used by reductserFactory
ReductserFactoryobject
The result of supplying reductsers to a reductserFactory
ReductserFactoryobject
The result of supplying reductsers to a reductserFactory

simpleAction() ⇒ ActionCreator

An action creator with no payload.

Kind: global function

payloadAction() ⇒ ActionCreator

An action creator with a typed payload.

Kind: global function

handlerAction(handler) ⇒ ActionCreator

An action creator with a handler function payload.

Kind: global function

Param Description
handler like a reducer, a function taking the previous state and arguments to the action creator to create a new state.

actionFactory(actionParts, reducer) ⇒ ActionFactory

Fills in the type and reducer parameters on an an object values are action creators (see: simpleAction, payloadAction, handlerAction).

Kind: global function

Param Description
actionParts an object whose values are action creators
reducer the scope (and value of the "reducer" key) on all of the actions created by these actions

reductser(initialState, actionParts, reducer) ⇒ ReductserCreator

Create a reductser, to be supplied as values on an object supplied to a reductserFactory.

Kind: global function
Export:

Param Description
initialState A function producing an initial state.
actionParts An object whose values are action creators, e.g.: simpleAction
reducer A reducer on the previous state and the incoming action.

reductserFactory(reducerParts) ⇒ ReductserFactory

Returns the scoped actions and reducers from a map of reductsers.

Kind: global function

Param Description
reducerParts An object whose values were constructed by reductser

ActionCreator ⇒ object

An intermediate type used by actionFactory

Kind: global typedef

Param Type
type SerializableKey
reducer SerializableKey

ActionFactory

An object whose values create actions.

Kind: global typedef

ReductserCreator ⇒

An intermediate type used by reductserFactory

Kind: global typedef
Returns: Reductser Parts

Param Type
reducer SerializableKey

ReductserFactory ⇒ object

The result of supplying reductsers to a reductserFactory

Kind: global typedef

Param Type
reducer SerializableKey

Properties

Name Description
actions action constructors
reducers Indicates whether the Power component is present.

ReductserFactory ⇒ object

The result of supplying reductsers to a reductserFactory

Kind: global typedef

Param Type
reducer SerializableKey

Properties

Name Description
actions action constructors
reducers Indicates whether the Power component is present.