Missing requestAnimationFrame after upgrading to 0.5.3
See original GitHub issueBug report
Description / Observed Behavior
After upgrading from 0.4.2 to 0.5.3, I now get the following error on a specific call of useSWR
:
TypeError: 'requestAnimationFrame' called on an object that does not implement interface Window.
Expected Behavior
It should load as it did before
Repro Steps / Code Example
I don’t know how to isolate this. Other calls work fine, this works fine too, it breaks after a rerender. Stack trace is useless, it just points that it happens inside useSWR
, and none of my calls pass requestAnimationFrame
calls inside useSWR.
Additional Context
SWR version: 0.5.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Controlling fps with requestAnimationFrame? - Stack Overflow
If you want a more arbitrary FPS then there is no point using rAF as the frame rate will never match the monitor's...
Read more >Window.requestAnimationFrame() - Web APIs | MDN
The function to call when it's time to update your animation for the next repaint. The callback function is passed one single argument, ......
Read more >requestAnimationFrame for smart animating - Paul Irish
Then you can set up a couple of setTimeout's to update the values over time. To set the speed of each animations, you...
Read more >Best practices for requestIdleCallback and ... - Luis Ball
Using requestAnimationFrame to run callbacks between frame paints ... have gone by between updateFeed calls before trying to update the feed ...
Read more >467617 - How to dramatically improve Chrome's ... - Monorail
Chrome attempts to wake up requestAnimationFrame() animations at vsync ... bajones/4: When you (or anyone @chromium.org) has serious cycles to work on this, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ranisalt Could you have provide some error trace or a minimal repro on codesandbox to help us identify the issue?
Thank you, I can confirm they’re the identical issue with different output from different JS engine now. I’ll close this as duplicate of #1050