Drum Machine react no keypress event

Drum Machine react no keypress event

i get no keydown or keyup event in react
other user stories
i have already covered

Get rid of the onKeyPress in the following line:

<div className="drum-pads"  onKeyPress={this.handleKeyPress.bind(this)}>

Instead, you should add document.addEventListener("keydown", this.handleKeyPress.bind(this); to the componentDidMount method and document.removeEventListener("keydown", this.handleKeyPress.bind(this); to the componentWillUnmount method.