DEV Community

Discussion on: React useUndo hook

Collapse
akshaay9 profile image
Akshaay9

Use useRef for storing timerID, or useCallback it

Collapse
sneakysensei profile image
Snehil

I second this. Although I'm not sure how can one useCallback a timer. Can you pls provide an example snippet?