@NizarMjr
Posted
@Arturo I like what you have done it's nice work Getting element from DOM with its ID is useful to focus on input however there is useRef hook could make same work ex : const inputRef = useRef(null) <input ref={inputRef} /> function () { //your js logic inputRef.current.focus()}
@artimys
Posted
@NizarMjr Thanks for the feedback,
I was having some issues with useRef hook but I'm thinking it was related to ReactHookForms and then I found how to share the ref but trouble getting that as well.
Funny, found the solution in ReactHookForm's docs useFocus(). Did the trick.