Skip to content

ResizeObserver loop limit exceeded #2712

@RMacfarlane

Description

@RMacfarlane

Describe the bug

This doesn't seem to be impacting functional behavior, but is generating error noise. A "ResizeObserver loop limit exceeded" is fired on the window when resizing the window.

To Reproduce

Using this code base and google chrome > 64:

  1. Add
window.addEventListener('error', (e) => {
  // eslint-disable-next-line no-console
  console.log(e)
})

on

  1. Run npm start
  2. Maximize the browser window and then resize it to be smaller on the common features example
  3. Looking at the dev tools, ResizeObserver loop limit exceeded is logged repeatedly

Expected behavior

No window errors are generated

Environment

  • react-data-grid version: latest
  • react/react-dom version: ^17.0.2

Additional context

There's a good write up of this issue here and more discussion here

The most common approach to preventing this error from being fired seems to be to use requestAnimationFrame

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions