Working through ReactJS lifecycle deprecations
This commit is contained in:
@ -11,7 +11,7 @@ class Hotkeys extends React.Component {
|
||||
this.handleKeyDown = this.handleKeyDown.bind(this);
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyDown, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user