Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requestAnimationFrame causes a weird UI #51

Open
HuyAms opened this issue Nov 1, 2023 · 0 comments
Open

requestAnimationFrame causes a weird UI #51

HuyAms opened this issue Nov 1, 2023 · 0 comments

Comments

@HuyAms
Copy link

HuyAms commented Nov 1, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant