react-use-count-down icon indicating copy to clipboard operation
react-use-count-down copied to clipboard

requestAnimationFrame causes a weird UI

Open HuyAms opened this issue 2 years ago • 0 comments

If you leave the page in another tab, browse in another tab, wait some time then come back to the tab with the Countdown, notice the countdown tried to countdown fast to fill in the missing time when you were away in another tab.

It happens with the demo also: https://stackblitz.com/edit/react-use-count-down?file=index.js

Could we cancel the animation frame when users navigate away from the current tab?

HuyAms avatar Nov 01 '23 10:11 HuyAms