how to handle event when someone presses enter on react code example Example: on enter key press react onKeyPress={(e) => e.key === 'Enter' && handleSearch()}