Skip to content

ResizeObserver loop limit exceeded #531

@egorprnn

Description

@egorprnn

Describe the bug

We use the module on a fairly large site and embed a virtual scroll in one of the parts of the site using ReactDOM. When navigating between pages, we do not cause unmount between pages - because this process is difficult to follow on a large-level project that uses many technologies and react is not the main one.
Because of this, users often encounter an error: ResizeObserver loop limit exceeded

Looking for more information, I came across a hack that avoids this error, you need to wrap the ResizeObserver callback in an animationRequestFrame:

https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded/58701523#58701523
PolymerLabs/uni-virtualizer#112
nolimits4web/swiper#5441

How often does this bug happen?

Often

Screenshots or Videos

No response

Platform

  • OC: any
  • Browser: any

tanstack-virtual version

3.0.0-beta.54

TypeScript version

4.9.5

Additional context

No response

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions