The Stale Closure Problem in React.

Building a countdown timer in React sounds like a very basic, beginner-level task. You set up a state variable, declare a setInterval…