Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

react hooks html imput on change

 function useInput({ type /*...*/ }) {
   const [value, setValue] = useState("");
   const input = <input value={value} onChange={e => setValue(e.target.value)} type={type} />;
   return [value, input];
 }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #hooks #html #imput #change
ADD COMMENT
Topic
Name
2+9 =