showing results for - "controlled components reactjs interview questions"
Ana Sofia
11 Feb 2020
1function FormValidation(props) {
2 let [inputValue, setInputValue] = useState("");
3
4 let updateInput = e => {
5   setInputValue(e.target.value);
6 };
7
8 return (
9   <div>
10     <form>
11       <input type="text" value={inputValue} onChange={updateInput} />
12     </form>
13   </div>
14 );
15}
16