【发布时间】:2016-06-21 02:17:48
【问题描述】:
我有以下商店和操作
const AliceStore = Reflux.createStore({
update() {
var aliceNewValue = ...
this.trigger(aliceNewValue);
}
});
const BobActions = Reflux.createActions(['notifyBob']);
现在我想在每次调用AliceStore.trigger(aliceNewValue) 之后解雇BobActions.notifyBob(aliceNewValue)。
我知道我可以在this.trigger(aliceNewValue) 之后从AliceStore 触发它,但我想以某种方式在BobActions 中设置监听,如下所示:AliceStore.listen(this.onAliceStoreChange)
【问题讨论】: