25 + 5 Clock Tests Problem

Ok, I know, that there are many topics here with the same problem, but those didn’t help… I’m trying to pass the

25 + 5 Clock Challenge

and I can’t pass Timer tests (Timer doesn’t reach 00:00, but actually it does). I’m completely lost. Was trying to fix the issue for 2 days long, but still can’t figure out the solution. Also I’ve tried to make timer work using Date, but the problem is still there.

Here is my project - 25 + 5 Clock React

What am I doing wrong?

Ok, I fixed it! So the problem was in the this.state.timeLeft property in which I stored the amount of seconds left til timeout. I was rendering it’s value (formatted) to the element with id time-left. Although it was reaching zero if u just look at it, actually it never was really zero. So I’ve added “minutes” and “seconds” to the state object and rendered them instead of timeLeft property. It works now!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.