DEV Community

Tom
Tom

Posted on

How to type useRef?

This is more for personal reference:

const ref = useRef<HTMLDivElement>(null);

...

<div ref={ref}>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)