You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
setTimeout execute immediately at 1e12; This causes useRaf not working. #779
Activity
thoamsy commentedon Nov 28, 2019
Maybe the browsers just throttle down the 1e12 to 0 or something else. Like the below code, you can see
10, 20, 30.I think you can use it with
useRaf(50)instead ofuseRaf()xobotyi commentedon Nov 28, 2019
Whole JS setTimeout and setInterval does not work with numbers greater than 1e12(actually 2147483647) , because they use 32bit integer inside. https://stackoverflow.com/questions/3468607/why-does-settimeout-break-for-large-millisecond-delay-values
fix: prevent setTimeout overflow for large ms values in useRaf (strea…