-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
fix: "ResizeObserver loop limit exceeded" #23
fix: "ResizeObserver loop limit exceeded" #23
Conversation
a6f512a
to
3bd051d
Compare
Hey @FezVrasta - do you have a repro for the issue somewhere? Thanks! |
No I'm sorry, it happened in a fairly complex non-OSS app, but you should be able to track down the issue following the PR I linked in the commit |
Hey @FezVrasta , I tested the change locally and it broke the grouped example. I traced the problem to some height measurements being dropped due to the component being unmounted and canceling the animation frame request. What worked for me was to remove the useEffect(() => () => window.cancelAnimationFrame(animationFrameID.current)) call. I think this should bring no harm, but I might be wrong (for example, measuring items which are no longer in the DOM). We will see. Can you please test this in your setup? Thank you. |
Sorry I did forget to add the |
3bd051d
to
c0f1d6d
Compare
Yeah, It is reproducible only in grouped mode with footer set, since multiple measurements are performed. I will examine it further and figure out something. |
How do you run the docs locally with a local version of react-virtuoso? Do I have to switch to |
This is the site: https://github.com/petyosi/react-virtuoso-site I keep it as a peer directory of the react-virtuoso repo, (the dir is called lib): Thank you for your effort! |
On my side, when I load the example (without any interaction - resize, scroll, etc), the items do not get loaded. I only see the header and the button. The reason is that one measurement gets dropped. |
May I know more about your environment? I wonder if it's OS/browser/version specific. |
Chrome 75 on MacOS. |
Ok, same here, I'm not sure what's going on then... |
Did you rebase on v0.10? I made one minor change in the hooks behavior there, and that is the only problem I can think of. Anyway, will check again on my side later this week. |
Copies the approach used in airbnb/visx#335 to fix a "ResizeObserver loop limit exceeded" error
c0f1d6d
to
118da4c
Compare
I just rebased but I can't still reproduce your issue |
Whatever it was, it works now. Sorry for the hassle. published v0.10.1 with the fix. Thank you once again, |
I'm experiencing the same issue again, I guess I didn't fix it completely 😢 |
I haven't changed anything in the area since this PR. Something which might help me is the stack trace (and, of course, a repro would be awesome). Contact me on my email if I can observe the problem somewhere. Cheers. |
Copies the approach used in airbnb/visx#335 to fix a "ResizeObserver loop limit exceeded" error