Comments (6)
Hello @robynm,
It's a good idea.
OK, don't hesitate to submit a PR ;-)
from use-timer.
Merged into develop
branch.
from use-timer.
Hi, I have the same need.
The only thing is that if I initialise my timer with the value saved in db (initialTime: timeFromDB
), the reset
function will reset to this value (which is logic).
A solution could be to pass an optional parameter to the reset
function.
I will check your code and try to make a PR if you think its a good improvement
from use-timer.
Or a solution could be to have a function allowing to set the time
directly, so I wouldn't have to use initialTime
. What do you think could be the best option?
from use-timer.
Just realise advanceTime
allows me to set the time when it's initialised to 0, sorry for the spam 🙈
(maybe exporting a setTime
function would give more flexibility 😉)
Thanks for the amazing work btw! 💯
from use-timer.
Well it's still buggy this way, play
will start from initialTime
, not from the current.
Will try to open a PR
from use-timer.
Related Issues (14)
- Add Prettier to project
- `setTime` from the `useTimer` hook? HOT 6
- Milliseconds timer with endTime HOT 5
- Would you consider a PR that adds a third state for the timer? HOT 7
- Autostart problems HOT 22
- Missing payload. HOT 6
- Changing default endTime value if mode is "Decremental" HOT 1
- Timer callbacks
- timer not accurate in mobile HOT 1
- problem with firefox browser HOT 10
- Updating initial time won't update the timer HOT 7
- wrong time over calculation
- Consider using Milliseconds instead of seconds 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-timer.