Created
February 15, 2016 14:48
-
-
Save vcanales/9d568b1412f9c0083067 to your computer and use it in GitHub Desktop.
Component Lifecycle Problems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
componentDidMount() { | |
this.setState(this.initialize()); | |
return CatedralStore.addChangeListener(() => this._onCatedralChange()); | |
} | |
componentWillUnmount() { | |
console.log("remove change listener") | |
return CatedralStore.removeChangeListener(this._onCatedralChange); | |
} | |
_onCatedralChange() { | |
console.log("catedral change event cb") | |
return this.setState(this.initialize()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment