"Maximum update depth exceeded" when clicking the image
See original GitHub issueI have been getting this error and it looks like it was introduced recently. At first I assumed it was an issue in my local setup, but I can reproduce it in the demo.
It seems to come from the fact that the onChange
gets called in an infinite loop.
- Version: 6.0.7
- Steps to reproduce:
- open demo (Tried in Firefox and Chrome)
- upload an image
- click anywhere in the image
- notice React Error
- Error:
Invariant Violation Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
Note: rolling back to v6.0.5 fixes it.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
React error: warning maximum update depth exceeded
Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency ...
Read more >Fix the "Maximum Update Depth Exceeded" Error in React
One quick solution is to move the function inside the useEffect hook. ... We can see that now incrementViews is scoped inside the...
Read more >How to Fix Maximum Update Depth Exceeded in React and ...
In this video, I show you several ways the dreaded " Max Update Depth Exceeded " error commonly occurs in React and React...
Read more >React - maximum update depth exceeded - CodeProject
My code is in my GitHub repo. The file where the error occured is in my App. js file.
Read more >[Solved]-Maximum update depth exceeded-Reactjs
[Solved]-Maximum update depth exceeded-Reactjs. Search. score:3. Accepted answer. clicked={() => this.postClicked(el.id)})}. Colin Ricardo 15240.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@noashka Please try 6.0.12 this issue should be fixed now. It was proving too problematic to try and fix/complete invalid aspect crops every component update/render, so I just fix/complete them if they are incorrect on image load
Great thanks for checking
On Thu, 24 Jan 2019 at 11:03, Vadim notifications@github.com wrote: