MCPcopy Index your code
hub / github.com/microsoft/SandDance / checkForNestedUpdates

Function checkForNestedUpdates

docs/external/js/react-dom.development.js:23221–23240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers 1

scheduleUpdateOnFiberFunction · 0.85

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected