On expire functionality
Hi)
Thank you for a nice and clean lib.
I have a question/proposal for you. How is it supposed to be used to run some logic at the end of the timer? For example I need to trigger log out when timeLeft === 0, but it's a default value. Maybe it's better if timeLeft would be not equal zero by default on start/restart but to equal initialTime? Or maybe you're working on some kind of onExpire callback?
Hey @mikhailgagarin
onExpire callback is not something that should be added in my opinion. But I'm thinking about adding some extra fields that would show a current state of a counter like started, expired and running. I think it would solve your issue, right?
Yeah, it would be great!
It would be really cool if it was possible to pass a custom function for changes of state.