arrow_backBACK TO DRILLS
White BeltusereflockPREMIUM

regular variables reset across renders

A developer needs to store a setInterval ID between renders so it can later be cleared. Why is useRef more appropriate than a normal local variable?

lock

This Drill is Locked

This is a premium drill. Continue on to the next free drill in the sequence.

CONTINUE DRILLarrow_forward
BugDojo
BlogFAQ

© 2026. Carved in code.