Created
November 27, 2016 21:16
-
-
Save jsergiu/7e34571df46c8aed3cac53e65a9519d4 to your computer and use it in GitHub Desktop.
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
class Greeting extends React.Component { | |
componentDidMount() { | |
window.MyApp.events.onEscape = this.closePopup; | |
} | |
componentWillUnmount() { | |
window.MyApp.events.onEscape = null; | |
} | |
closePopup () { … } | |
render() { … } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment