Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yaros-dev committed Jul 30, 2024
1 parent 6e49031 commit e04f8c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ export class App extends Component<{}, State> {
key: '',
};

handleKeyup = (event: KeyboardEvent) => {
handleKeyUp = (event: KeyboardEvent) => {
this.setState({
key: event.key,
});
};

componentDidMount() {
window.addEventListener('keyup', this.handleKeyup);
window.addEventListener('keyup', this.handleKeyUp);
}

componentWillUnmount() {
window.removeEventListener('keyup', this.handleKeyup);
window.removeEventListener('keyup', this.handleKeyUp);
}

render() {
Expand Down

0 comments on commit e04f8c7

Please sign in to comment.