Skip to content
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

Error: ResizeObserver loop limit exceeded #49

Closed
lottamus opened this issue Sep 17, 2019 · 1 comment · Fixed by #181
Closed

Error: ResizeObserver loop limit exceeded #49

lottamus opened this issue Sep 17, 2019 · 1 comment · Fixed by #181
Assignees
Labels
p/high t/bug Something isn't working

Comments

@lottamus
Copy link
Contributor

lottamus commented Sep 17, 2019

Sentry Issue: STUDIO-DESKTOP-20

Error: ResizeObserver loop limit exceeded
  at None (/docs-preview/gh/stoplightio/studio)

ResizeObserver is being in Elements by @rehooks/component-size: https://github.com/stoplightio/elements/blob/master/src/components/Docs.tsx#L4

Description

Here's a similar issue in a library that is also using ResizeObserver: souporserious/react-measure#104. They fixed the issue by canceling the animation frame when the component is unmounted: https://github.com/souporserious/react-measure/pull/118/files#diff-2e71677d1028fc71469e53aa449f42d5R41

Expected

To fix the issue, we likely need to fork the @rehooks/component-size repo, wrap the following lines in a requestAnimationFrame and cancel the animation when the component is unmounted:
https://github.com/rehooks/component-size/blob/master/index.js#L49-L52

@lottamus lottamus added the t/bug Something isn't working label Sep 17, 2019
@lottamus lottamus added the p:low label Oct 7, 2019
@lottamus lottamus added p/high and removed p:low labels Dec 30, 2019
@lottamus lottamus self-assigned this Dec 30, 2019
@stoplight-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 3.10.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p/high t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants