react-resize-detector icon indicating copy to clipboard operation
react-resize-detector copied to clipboard

ResizeObserver loop limit exceeded in v9.1.0

Open char0n opened this issue 1 year ago • 4 comments

Hi,

Thanks for great work!

After updating from 8.1.0 to 9.1.0 I've started to see ResizeObserver loop limit exceeded error.

image

I needed to add refreshMode and refreshRate options for application to work as before.

  const { ref } = useResizeDetector({
    onResize: handleResize,
    refreshMode: 'debounce',
    refreshRate: 0,
  });

Affected application: https://github.com/swagger-api/swagger-editor/tree/next


This is IMHO very strange as 9.0.0 release notes states that those options are no longer needed.

char0n avatar May 08 '23 14:05 char0n

@char0n Could you please provide a Codepen reproduction of the bug? This would greatly assist us in identifying the root cause of the issue and finding a solution

snelsi avatar May 08 '23 14:05 snelsi

Hi @snelsi, unfortunately I don't think so. I can only reproduce in SwaggerEditor@5 when full codebase is involved.

Would the dev setup of SwaggerEditor@5 help you https://github.com/swagger-api/swagger-editor/tree/next#development to set the SwaggerEditor@5 locally?

char0n avatar May 08 '23 14:05 char0n

I also encountered this bug, but I did not reproduce it in the demo! this version is latest 9.1.0 image

This is a Demo

Shen120 avatar May 25 '23 07:05 Shen120

I've noticed I was having infinite re-renders without any errors. I rolled back to 9.0.0, it doesn't have the issue

hassenc avatar Jun 08 '23 14:06 hassenc

Because this issue seems to have been inactive for quite some time now, I'm closing it as stale. If you're still encountering this bug in v10, feel free to reopen it.

snelsi avatar Mar 25 '24 09:03 snelsi

I haven't seen it in v10.

char0n avatar Mar 25 '24 10:03 char0n