Select: Warning Maximum update depth exceeded.
See original GitHub issueUpdated to the latest v2.17 and am seeing the following warning when opening the Drop
on a Select
component;
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 InfiniteScroll (https://p86yu.csb.app/node_modules/grommet/es6/components/InfiniteScroll/InfiniteScroll.js:21:23)
Here’s a Codesandbox reproducing the issue.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
React warning Maximum update depth exceeded
I'm getting this warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either ...
Read more >Fix the "Maximum Update Depth Exceeded" Error in React
One quick solution is to move the function inside the useEffect hook. function App() { const [views ...
Read more >React - maximum update depth exceeded - CodeProject
<pre>index.js:1 Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect ...
Read more >Maximum update depth exceeded warning in React
Maximum update depth exceeded warning in React ... This warning can often happen when a component sets the state inside the useEffect hook....
Read more >Maximum update depth exceeded problem without using ...
"Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have ...
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
These two useEffects seem to be entering into an infinite loop. Each have dependencies of
pendingLength
which gets set in each, which then satisfies the dependency condition as well as the checks within the useEffects. Seems like we need to add an additional condition aroundpendingLength
.This may have been fixed by #5636 . Select uses InfiniteScroll for its options and had an infinite recursion with onMore when the list of items was empty.