DEV Community

Discussion on: Storing values with the useRef hook

Collapse
 
kildareflare profile image
Rich Field

Dan Abramaov has a great post on using this feature of hooks to make setInterval declarative.
The hook is used to store a reference to a callback.
overreacted.io/making-setinterval-...

Collapse
 
emma profile image
Emma Goto 🍙

Interesting, I'll give that a read. Thanks!