Donburi Model
Made by taking ideas from facebook/flux Dispatcher and the example Store and Action implementations, this module attempts to bring a simple single Model for managing application state.
The idea is to store application in one object, to provide a single source of truth. All handling functions are called by a request method and are run synchronously.
Usage
var getModel = getModel;var Constants = ; { return operand + 1;} var Model = ; Model;Model; moduleexports = Model;
Examples
See the tests in modules/__tests__/DonburiModel.js
and the example application in examples/clicker
.
Demo
See this JSBin for a demo.