Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

capture enter button react input

const Enter = () => {
  	const handle = () => console.log('Enter pressed');
  
	return <input type="text" onKeyDown={e => e.key === 'Enter' && handle} />;
};
 
PREVIOUS NEXT
Tagged: #capture #enter #button #react #input
ADD COMMENT
Topic
Name
1+1 =