store

Store : Store

A Store holds an object as it’s internal state. The state can be read with .getState(keyPath, defaultValue) State can be set by reducers in the .reducers array. Trigger the reducers to run with .action(obj). Once the reducers run, .onChange is called with the new state.

Kind: global class

store.action(actionObj) ⇒ Object

Performs an action on the store. Triggers the onChange callbacks with the new state.

Kind: instance method of Store
Returns: Object - returns the new state.

Param Type Description
actionObj Object is added to each reducer along with the current state.

store.get(path, defaultValue) ⇒ Object

Returns the value at path. If the value doesn’t exist, it will return defaultValue or undefined.

Kind: instance method of Store
Refrence:: https://lodash.com/docs/4.17.4#get

Param Type Description
path String path of the property to get.
defaultValue Object value to return if there is no value at path.