question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot Reset Time with key

See original GitHub issue

Hello,

I tried to reset the time with changing the key whenever the timer completed. But, the timer did not reset at all.

it works when i used the timer in the modal, but failed when i do it in a single page. <Countdown date={startDate.current + 5000} key={reset} onComplete={() => setReset(prev => prev + 1)} renderer={({ formatted, completed }) => { if (completed) { return ( <span className={classes.hyperlink} onClick={e => { e.preventDefault(); setReset(reset + 1); }}> ReSend </span> ); } else { return ( <span> <b> {formatted.minutes}:{formatted.seconds} </b> </span> ); } }} />

Im using Nextjs for development any help? thanks

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
HendryVarianto14commented, Sep 29, 2022

Can you share your complete code in a sandbox or something? I am having issues now.

In my case, it does not reset when closing a modal.

I never tried it, but try to use the flag of the modal as the key of the Countdown LMK if this works

which flag?

The Modal’s flag. y’know, the open={flag}

0reactions
SalahAdDincommented, Sep 29, 2022

Can you share your complete code in a sandbox or something? I am having issues now.

In my case, it does not reset when closing a modal.

I never tried it, but try to use the flag of the modal as the key of the Countdown LMK if this works

which flag?

The Modal’s flag. y’know, the open={flag}

I have to check it again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

If you can't change the time or time zone on your Apple device
Make sure that your Apple TV is connected to the internet. · Go to Settings > General > Time Zone. · If the...
Read more >
Computer Time and Date Get Reset or Losing Time
A computer losing time or having the date and time reset is a symptom of an issue relating to the computer hardware or...
Read more >
How to Reset Real Time Clock (RTC) to Recover Your Dell ...
Press and hold the power button (around 30-35 seconds), until the power LED blinks three times. Release the power button. The RTC reset...
Read more >
SOLVED: Can't reset the time on digital watch - Fixya
1. Press and hold the "Set" button for 2 seconds. The "Set" button is on the lower right side. 2. Press the "Date...
Read more >
Reset button does not work anymore - Apple Time Capsule
Hello everyone, I have a 4th generation Time Capsule (A1409) that I can't use and reset anymore. It is not recognized by Airport...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found