Working through ReactJS lifecycle deprecations

This commit is contained in:
James Barnsley
2019-11-15 13:50:39 +13:00
parent f5db13f17c
commit 0206fb7c69
18 changed files with 20078 additions and 15360 deletions

View File

@ -11,7 +11,7 @@ class Hotkeys extends React.Component {
this.handleKeyDown = this.handleKeyDown.bind(this);
}
componentWillMount() {
componentDidMount() {
window.addEventListener('keydown', this.handleKeyDown, false);
}