react-use
react-use copied to clipboard
"ResizeObserver loop limit exceeded" when using useMeasure
The issue is described here:
This error means that ResizeObserver was not able to deliver all observations within a single animation frame. It is benign (your site will not break). – Aleksandar Totic Apr 15 at 3:14
https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded
The solution is described here:
Simply need to add window.requestAnimationFrame.
https://stackoverflow.com/a/58701523/368691
Seems like there is an associated PR to export useMeasureDirty.
There is any special reason for not using window.requestAnimationFrame by default? Or at least don't default export the useMeasure.
I'm facing multiple Sentry reports because of this. I'll use useMeasureDirty with the full path import, but would be really nice to expose this as any other hook.
same here. still facing this issue as of Dec 2023