showing results for - "react check if focused"
Shayna
27 Mar 2017
1function Input(props) {
2  const [hasFocus, setFocus] = useState(false);
3
4  return (
5    <input
6      {...props}
7      onFocus={() => setFocus(true)}
8      onBlur={() => setFocus(false)}
9    />
10  );
11}