What’s the difference between `useRef` and `createRef`?
I was going through the hooks documentation when I stumbled upon useRef. Looking at their example… function TextInputWithFocusButton() { const inputEl = useRef(null); const onButtonClick = () => { // `current` points to the mounted text input element inputEl.current.focus(); }; return ( <> <input ref={inputEl} type=”text” /> <button onClick={onButtonClick}>Focus the input</button> </> ); } …it … Read more