Comments (7)
Hello @pawelsas,
Thanks for your comment and your demo. I'm going to check that.
from use-timer.
same issue, any workaround?
from use-timer.
Hey @eddsaura,
Thanks for opening this issue.
Could you create a reproductible example of this issue, for example on https://stackblitz.com/?
Thanks.
from use-timer.
Hi @thibaultboursier, I have a similar issue as @eddsaura I guess.
Here's a demo: https://stackblitz.com/edit/react-dpshem?file=src/App.js
Issue 1: click "Update initial to 20", see nothing happens. Expected from my side: initialTime
is set to 20.
Issue 2: click "Add 20" and afterwards "Start". See 20 is added to the initial time but removed as soon as timer is started. This is for me even more critical and feels related.
What do you think?
Thanks!
from use-timer.
Sorry! I finally had to do it myself. Thanks for answering tho! <3
from use-timer.
same issue, any workaround?
This issue has been fixed on the 'develop' branch (although a reset is required before a new initialTime is reflected). Unfortunately there is no release, but I've used it without issue.
from use-timer.
+1. Thank you for raising, @eddsaura! Came here to discuss the same issue.
My use case is building a Pomodoro timer in React where I want to reset the timer back to various initialTime
using a useState
variable within the component, but noticing initialTime
does not change after its initial set value.
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
- Feature request: set initial status HOT 6
- 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.