是否可以使用Reflux监听对象(stateKey)的特定字段的更改?

时间:2015-03-26 03:05:43

标签: reactjs refluxjs

对于我的商店,我有以下几点:

var GraphStore = Reflux.createStore({
    listenables: [GraphActions],
    updateGraphedMetrics: function(graphs) {
        ...
        this.trigger(graphs);
    },
    getInitialState: function() {
        this.graphedMetrics = [];
        return this.graphs;
  }
});

我正在使用:

var Dashboard = React.createClass({
  mixins: [Reflux.connect(GraphStore,"graphs")],
  render: function() {
  ...
  }
});

这很有效。但是,如果我想在图形(stateKey)中的特定索引而不是整个数组中监听更改,该怎么办?这可能与目前的结构有关吗?如果没有,最好的方法是什么呢?

0 个答案:

没有答案
相关问题