Subscribes to the stores change event, that is emitted when the store updates or replaces its state.

📘

React Component

When used with React the react component mixin handles binding and unbinding stores and actions, see the Flux property of the mixin for more information.

var context = fluxapp.getContext();
var store = context.getStore('name');

function onChange(state) {
  // state on store 'name' was changed
}

store.addChangeListener(onChange);

👍

On to removeChangeListener(cb)