Skip to content

Instantly share code, notes, and snippets.

@zinevych
Created October 14, 2015 21:36
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 zinevych/4fa4690976d932bc3697 to your computer and use it in GitHub Desktop.
Save zinevych/4fa4690976d932bc3697 to your computer and use it in GitHub Desktop.
var Store = require('Store');
var DemoApp = React.createClass({
componentDidMount: function() {
Store.addChangeListener(this._onChange);
}
componentWillUnmount: function() {
Store.removeChangeListener(this._onChange);
}
render: function() {
return (
<div>
Hello
</div>
);
}
});
_onChange: function() {
//some functionality
}
module.exports = DemoApp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment