solid-state
Triggers listener functions when your state changes
Install
$ npm install --save solid-state
Usage
var SS = var optionalInitialState = {}var AppState = optionalInitialState // Called a function with a clone of the new state whenever state changesvar removeListener = AppState // someRenderFunction gets called with {level: 9001}AppState // someRenderFunction gets called with {level: 9001, {nested: {property: 'foo'}}AppState AppStateAppState; // {level: 9001, {nested: {property: 'foo'}}console // Overwrite the entire state by only providing a valueAppState // {overwrite: 'state'}console // Stop listening for changes
License
(c) 2015 Chinedu Francis Nwafili. MIT License