0

私の店では、次のようなものがあります。

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) で変更をリッスンしたい場合はどうすればよいでしょうか? 今の体制でそれは可能ですか?そうでない場合、それを行うための最良の方法は何でしょうか?

4

0 に答える 0