Break length does not work after the timer hit 00:00 (React)

break length does not work after the timer hit 0 mins and 0 secs although clear interval worked and the timer stopped but it does not start tickValue function after passing set interval to it. I spent much time trying but I gave up and I like to have a little push to move on. thank you :slight_smile:.

here is the link for CodePen:
https://codepen.io/andrewalkazeer/pen/mapeLv

In your tickValue(), there is a line (line 93, I believe) that looks like this:

     var min = Math.floor((this.state.newValue - counter) / 60);

If you open the Chrome Dev Tools (F12 or ctrl-shift-I), or whatever dev tools you use, and you’ll see you’re getting an error there. seems counter is not defined. Is it possible you mean to use this.state.counter here?

1 Like

Yes, I meant to use this.state.counter, thank you very much sir :slight_smile: