Skip to content

Instantly share code, notes, and snippets.

@cassiozen
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cassiozen/2cda15d5bf9e4bff06c6 to your computer and use it in GitHub Desktop.
Save cassiozen/2cda15d5bf9e4bff06c6 to your computer and use it in GitHub Desktop.
componentDidMount: function() {
// Instead of TodoStore.addChangeListener(this._onChange);
TodoStore.addListener(StoreConstants.CHANGE, this._onChange);
},
componentWillUnmount: function() {
// Instead of TodoStore.removeChangeListener(this._onChange);
TodoStore.removeListener(StoreConstants.CHANGE,this._onChange);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment