Manages a state object. You must define `state` {Object} and `__changeListeners` {Array} on the object this is mixed into.
- Source:
Methods
-
(static) addChangeListener(handler)
-
Parameters:
Name Type Description handlerfunction Function to call when the state object changes - Source:
-
(static) didUpdate()
-
Called after state object is mutated
- Source:
-
(static) removeChangeListener(handler)
-
Prevents handler from being called for future changes
Parameters:
Name Type Description handlerfunction - Source:
-
(static) replaceState(newState)
-
Replaces the existing state object with newState
Parameters:
Name Type Description newStateObject - Source:
-
(static) setState(newState)
-
Copies properties of newState to the existing state object
Parameters:
Name Type Description newStateObject - Source:
-
(static) willUpdate()
-
Called before state object is mutated
- Source: