Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On expire functionality #11

Open
mikhailgagarin opened this issue Oct 29, 2020 · 3 comments
Open

On expire functionality #11

mikhailgagarin opened this issue Oct 29, 2020 · 3 comments

Comments

@mikhailgagarin
Copy link

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?

@alexkhismatulin
Copy link
Owner

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?

@mikhailgagarin
Copy link
Author

Yeah, it would be great!

@RodolfoSilva
Copy link

It would be really cool if it was possible to pass a custom function for changes of state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants