createRef or useRef method
Callback method
We simply set the ref attribute in the <input> with a function instead of ref attribute created by useRef().
This function receives the DOM node and assigns it to the inputRef we declared before.
Since we didn't create a ref with useRef the inputRef variable stores the DOM element itself hence we don't need to access the .current property, as you can see in the onClick and onFocusClick functions.