Typescript with useRef - how specify generic type?

const progressRef: React.MutableRefObject<HTMLDivElement | undefined> = useRef()
const hoursRef: React.MutableRefObject<any> = useRef()
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>
<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
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server