How to listen to keypress event in React

Events
By Jad Joubran · 
Last updated Jan 28, 2020
import React from "react";

function Input() {
  function handleInputKeyPress(event) {
    console.log(event.target.value);
  }

  return <input onKeyPress={handleInputKeyUp} />;
}