1 const [inputValue, setInputValue] = React.useState("");
2
3 const onChangeHandler = event => {
4 setInputValue(event.target.value);
5 };
6
7 <input
8 type="text"
9 name="name"
10 onChange={onChangeHandler}
11 value={inputValue}
12 />
13