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

Warning: Maximum update depth exceeded. #32

Closed
flash716 opened this issue Jan 3, 2022 · 1 comment
Closed

Warning: Maximum update depth exceeded. #32

flash716 opened this issue Jan 3, 2022 · 1 comment

Comments

@flash716
Copy link

flash716 commented Jan 3, 2022

I am seeing the following error in the console when using Marquee.

react_devtools_backend.js:2430 Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.
    at Marquee (http://localhost:1212/dist/renderer.dev.js:315289:17)

I believe the first useEffect (the one that calls calculateWidth) should have an empty dependency array. Without it the effect is continually running since calculateWidth changes state every time it runs.

Let me know if you would like a PR for this.

@justin-chu
Copy link
Owner

Should be fixed by #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants