addeventlistener on document in react js

JavaScript
document.addEventListener('keydown', this.handleKeyPress);

Source

Also in JavaScript: