Clock is too fast

Everytime I click on the stop_pause button the clock runs faster. I think it has something to do with setInterval() overlapping itself. I have tried clearInterval() but that didn’t seem to work.

Any suggestions?

Any and all help is appreciated!

Cheers :+1:

I think I solved it. I changed out the setInterval() to setTimeout in my handleInterval function and called the handleInterval function within the handleStartSession and the handleStartBreak functions

handleInterval() {
    if(this.state.timeLabel == 'Session') {
      setTimeout(this.handleStartSession, 1000)
    } else {
      setTimeout(this.handleStartBreak, 1000)
    }
  }

I leave up the post for anyone who has a similar problem.

Cheers :+1: