()
| 23219 | } |
| 23220 | |
| 23221 | function checkForNestedUpdates() { |
| 23222 | if (nestedUpdateCount > NESTED_UPDATE_LIMIT) { |
| 23223 | nestedUpdateCount = 0; |
| 23224 | rootWithNestedUpdates = null; |
| 23225 | |
| 23226 | { |
| 23227 | { |
| 23228 | throw Error( "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." ); |
| 23229 | } |
| 23230 | } |
| 23231 | } |
| 23232 | |
| 23233 | { |
| 23234 | if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) { |
| 23235 | nestedPassiveUpdateCount = 0; |
| 23236 | |
| 23237 | error('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.'); |
| 23238 | } |
| 23239 | } |
| 23240 | } |
| 23241 | |
| 23242 | function flushRenderPhaseStrictModeWarningsInDEV() { |
| 23243 | { |
no test coverage detected