reaction library


ModuleState<T extends StatefulWidget>
must init cares' value in class property defination like: class _xxState extends ModuleState { cares = {'moduleA': 'a','b','c', 'moduleB': 'c:cc', 'd'} } then you xxSate instance will have a props like: this.props.a = globalStore.moduleA.a this.props.b = globalStore.moduleA.b this.props.c = globalStore.moduleA.c [...]


MODULE_COMMON → const String


doAction(Action action, [String loading]) → void
run a action in queue the actions will run one by one in queue, and action.doChildAction(xx) will insert a action in current queue order eg. doAction(actionA); //in actionA's process Method: if call this.doChildAction(actionC); // this = actionA doAction(actionB); [...]
doFunction(void fn()) → void
quick way to start a pure function as a action
getModuleProp(String module, String propName) → dynamic
get specific module store's prop
regModule(String module, Map<String, dynamic> store) → void
register a module store