setInterval in a React app
I see 4 issues with your code: In your timer method you are always setting your current count to 10 You try to update the state in render method You do not use setState method to actually change the state You are not storing your intervalId in the state Let’s try to fix that: This would result … Read more