Comments (5)
Jut saw your last comment! Right, the Time
type expects both minutes
and seconds
. I should totally make that compatible with what's passed into the hook at the beginning.
Could you open an issue to start with? And if you want to submit the pull request that would be 💯
from use-countdown.
Spoke too soon! Looks like if you omit the minutes
property during a reset
that causes it.
I think this should probably be allowed, considering it works during the initial hook render, happy to take a stab at a PR for that when I have the time
from use-countdown.
Thanks for filing an issue @ndimatteo!
I think you're seeing an error because of the value you are passing to reset
. Reset accepts a Time
input that looks like this:
type Time = {
minutes: number
seconds: number
}
So in your case you should not pass in the format
property. It would look something like this:
resendCodeCountdown.reset({ seconds: 30 })
from use-countdown.
@all-contributors please add @ndimatteo for bug
from use-countdown.
I've put up a pull request to add @ndimatteo! 🎉
from use-countdown.
Related Issues (9)
- add Steven Creates as a contributor HOT 2
- Implementing a way to freeze/stop the timer HOT 11
- Implementing a reset countdown feature HOT 8
- Add a feature that will count the days in between the 2 dates HOT 2
- Add a new feature: allow changing the duration of the countdown HOT 6
- "Cannot find module: 'tslib'" HOT 9
- Is there a way to start with the countdown paused? HOT 9
- Countdown overtime HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from use-countdown.