Countdown resets before the end
See original GitHub issueI have a countdown that refresh a page when it’s completed. Some time before that, I show a modal. When the modal is shown, the countdown starts again, making the refresh never happening.
Here’s some parts of the code :
render() {
const renderer = ({ hours, minutes, seconds, completed }) => {
console.log('test : ' + seconds);
return true;
};
return (
<Countdown
date={Date.now() + 15000}
renderer={renderer}
onTick={({ hours, minutes, seconds, completed }) => {
if (seconds === 10) {
this.showModal();
}
}}
onComplete={() => window.location.reload()}
/>
);
}
Any idea?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Countdown timer | Lostpedia | Fandom
The countdown timer was regularly reset every 108 minutes, before and after the crash, a routine known as "pushing the button." As revealed...
Read more >League ending and resetting at an earlier time than the usual
I just checked my leaderboard and my countdown is counting down to the normal time that the league ends for me. Mine has...
Read more >How Do I Create A Countdown Time That Resets At A Specific ...
This is a simple countdown timer starting at 30 seconds from when the function is run and ending at 0. After reaching 0...
Read more >Countdown timer question - Arcade - Microsoft MakeCode
Has anyone else tried to make a countdown timer that resets at the end of the countdown? My son is working on a...
Read more >Countdown Resetter - Scripting Support - DevForum | Roblox
I've asked this once before and got a very vague answer that said … ... 50,1,-1 do wait(1) print('countdown: ',i) end print('resetting') end....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ndresx can confirm your solution works
It might, I will try this today and update my answer.