arrow_backBACK TO DRILLS
Black Beltcustom-hooks
useInterval stale callback reset
A useInterval(callback, delay) custom Hook includes both callback and delay in its useEffect dependency array. The parent passes an inline callback that changes every render. What subtle bug can happen?