Useref React TypeScript
const inputRef = React.useRef<HTMLInputElement | null>(null);
Obedient Oyster
const inputRef = React.useRef<HTMLInputElement | null>(null);
// create refernce for element
let refName= useState<HTMLDivElement>(null)
//usage
<div ref={refName} className=""></div>
// access in useEffect
refName.current