arrow_backBACK TO DRILLS
White BeltuserefPREMIUM
useRef vs useState for interval IDs
A component needs to store a setInterval ID so it can later call clearInterval when the user clicks Stop. Which approach is most appropriate?
A component needs to store a setInterval ID so it can later call clearInterval when the user clicks Stop. Which approach is most appropriate?