Closed poorneshhn closed 10 months ago
I saw this issue on stackoverflow [https://stackoverflow.com/questions/77380011/simple-component-in-react-chessboard-is-causing-constant-maximum-update-depth-e].
The issue is,
Chessboard
since metrics variable which is an object is given as a dependency to useEffect which in turn sets a state variable, there was infinite re-render.
metrics
Attaching a screenshot for your reference.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
I saw this issue on stackoverflow [https://stackoverflow.com/questions/77380011/simple-component-in-react-chessboard-is-causing-constant-maximum-update-depth-e].
The issue is,
Chessboard
component is imported and mounted on the DOM, there is a "maximum update depth exceeded" error.since
metrics
variable which is an object is given as a dependency to useEffect which in turn sets a state variable, there was infinite re-render.Attaching a screenshot for your reference.