02 - Stop and Reset

Fix: Resetting the intervalRef (April 20, 2020)

I missed a line in the videos to reset the intervalRef. If you don't set the intervalRef.current back to null, then the start button doesn't work again.

intervalRef.current = null

Here are the relevant lines:

Make 20 React Apps

⚛️ Build more than a to-do app🍎 Learn React best practices and concepts. ✅ Built for modern React w/ React Hooks

Already enrolled?
Sign in to continue learning.