Typescript with useRef - how specify generic type?

 const progressRef: React.MutableRefObject<HTMLDivElement | undefined> = useRef()
    const hoursRef: React.MutableRefObject<any> = useRef()


<div className="w-[0px] h-full transition-all duration-[4000ms]" ref={progressRef}></div>
 <h2 className="flex items-center min-w-[5%]" ref={hoursRef}>0</h2>

Help me with this error
image.png
Was this page helpful?