Help requested for timer test case of 25+5 clock

FCC tests 12. 13. 14, 15 are not passing even though I can see that my timer reaches 00:00 and it toggles between session and break .
Please help !

Thanks in advance.

During the tests your timer shows 00:-1 for a moment.

Yes, but is only visible in the debugger mode right? That’s the point when my session turns to break and vice-versa.

I migrated the whole code to a single class component and it passed all tests.
Probably my timer was taking few milliseconds more than the tests were expecting.

I still invite others to help me understand why doing this helped.