Hi, I need a countdown timer functionality (from 60 mins to 0) for my reactive web app. I've added JavaScript code on the client side, and it's running properly. However, the issue is that the timer only runs when my application's tab is active in the browser. If I switch to another tab, it stops, and when I return to it, it continues. Similarly, if my laptop screen is off, it stops, but when I turn the screen back on, it continues. Please suggest a solution."
Hi Priya,
You can achieve this by using the Page Visibility API to detect when the tab becomes hidden.