Class: Store

Store()

new Store()

Common store class
Source:

Classes

Store

Methods

commit(propName, value)

This method is used to update the value of a property in the state store.
Parameters:
Name Type Description
propName string The name of the property.
value number The new value of the property.
Source:

computed(propName, callBack)

This method is used to register a computed property that is computed every time the store value changes.
Parameters:
Name Type Description
propName string The name of the property to create.
callBack function The function to execute when depemdent props change.
Source:

get(propName) → {any}

This method is used to get the name of the property from the state store.
Parameters:
Name Type Description
propName string The name of the field in state store.
Source:
Returns:
The value of the field.
Type
any

serialize() → {Object}

This method returns a plain JSON object with all the fields in the state store.
Source:
Returns:
Serialized representation of state store.
Type
Object