Hey! How can we preserve the timer on the page reload/anywhere we go in th

Hey!

How can we preserve the timer on the page reload/anywhere we go in the application? Timer should be unaffected.
Help would be greatly appreciated.

Thanks!

Hi,

I also use this component and have the same problem. If i leave a page the timer should stop and start again if i come back to the startpage. I tried to use a detach/attach-listener what seems to be working but the timer does not use the definied “startTime” (setStartTime) if i want to start it at a defined time.

I m using the options “countUp”.

Michael

Hi, the startTime is used as the amount of time the timer will count. In the case of the countUp mode, it will start from 0 and go to startTime.
We would need to add a setCurrentTime to start in the middle of the count. Or you could just use setStartTime to the new time. The issue with that approach is that reset will use the new start time you provided.
The timer is on the client side, in order to keep the timer between views you would need to add the logic on the server side on detach and attach events to keep track of the time, the main issue is how to keep the timer going on the server side.