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 Warning: Maximum update depth exceeded. caused by setViewLayout #108

Closed
dprevost-LMI opened this issue Oct 6, 2024 · 2 comments
Closed

Comments

@dprevost-LMI
Copy link
Contributor

dprevost-LMI commented Oct 6, 2024

After loading 56 files where the waveform data is read from a JSON file, we get the below error that is caused by this line if we follow the Console Warning

Warning: Maximum
update depth exceeded.
can
component calls setState
but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.

image

image

Precision: I'm using the branch related to this feature where I read data from files, so it seems I'm too fast now and causing this error above when having too many audio file

@dprevost-LMI
Copy link
Contributor Author

🤔 Using two useState in alternate to set the width + height than the x+y, it resolved the problem. I wonder if because the the useState with the same name is called more than 50 times in a row, it detects if it has a depth call problem while in reality, here there are all "in parallel" and separate useState

@dprevost-LMI
Copy link
Contributor Author

This is caused by #109, so let clause and deal in that PR!

@dprevost-LMI dprevost-LMI closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2024
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

No branches or pull requests

1 participant