Stopwatch
The starter displays 00:00, but the timer and controls are missing. Make it start, pause, resume, and reset without creating extra timers or ticking while paused.
Requirements
- Add Start/Pause controls; resume from the paused time with only one interval running.
- Use a functional state update to add one second on each tick.
- Create the interval in an effect and clean it up on pause and unmount.
- Display elapsed time as
MM:SS, such as 01:05 for 65 seconds.
- Reset should stop the timer and return the display to
00:00.