Dispatchr - Flux 发送器


BSD
跨平台
JavaScript

软件简介

Dispatchr 运行在服务器和客户端上应用程序的 Flux 发送器。

示例代码:

var inherits = require('inherits');
var BaseStore = require('dispatchr/addons/BaseStore');
var MyStore = function (dispatcherInterface) {
    BaseStore.apply(this, arguments);
};
inherits(MyStore, BaseStore);
MyStore.storeName = 'MyStore';
MyStore.handlers = {    
'NAVIGATE': function (payload) { ... this.emitChange() ... }
};
MyStore.prototype.getFoo = function () { 
var context = this.getContext(), ... }
module.exports = MyStore;