"Maximum update depth exceeded" when clicking the imageSee original GitHub issue
I 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
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.
- Created 5 years ago
- Comments:12 (7 by maintainers)
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 email@example.com wrote:
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DominicTobias/react-image-crop/issues/218#issuecomment-457157757, or mute the thread https://github.com/notifications/unsubscribe-auth/AAuZ-poQ31IvaJQwT0aLGBYIgWHtrsSgks5vGZMfgaJpZM4YeCHZ .