-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
When the update method is called more frequently than requestAnimationFrame, NaN will be rendered #330
Comments
Your setInterval is updating the value at least every frame. If you want to update this way, increasing by 100 every ~10 milliseconds, do not use CountUp, because the setInterval will render the DOM about as often as requestAnimationFrame. RequestAnimationFrame runs as often as your browser allows, usually between 30-60 FPS. setInterval used with a time value lower than the max FPS of your browser will effectively do the same. As a side note, don't use |
The above is just a reproduction problem. The actual usage scenario is batch deletion. Each time the interface is called, 100 files can be deleted. After the deletion is successful, the interface is called again to delete the files. The front end accumulates and counts the number of files that have been successfully deleted. The interface response time is not fixed, so this problem still exists and occurs occasionally. I hope to get support, thank you! |
Description
When the update method is called more frequently than requestAnimationFrame, NaN will be rendered:
The text was updated successfully, but these errors were encountered: