sthore
Generator powered store/dispatcher; supports custom middlewares and action listeners. Comes with action loader in the package.
USAGE
Refer to sthore.spec.js
const Sthore STATE_CHANGED = ; const initialState = {};const sthore = ; // middlewares// are special functions that get called on every action dispatch // pre will get called before any of the actions are processedsthore; // post are called right after all actions have been processedsthore; // state changed action sthore; sthore;// -> state changed: someKey someValue undefinedsthore;// -> state changed: someKey someNewValue someValue // custom action const actionName = "CustomAction";const customAction = console; sthore; // we'll run pre middlewares, then all action listeners , then post middlewaresthore; sthore; // action loader const actionLoader = ;const actions = ; Object;