MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / commitAllLifeCycles

Function commitAllLifeCycles

code/third-party/public/app.js:12116–12152  ·  view source on GitHub ↗
(finishedRoot, currentTime, committedExpirationTime)

Source from the content-addressed store, hash-verified

12114 }
12115
12116 function commitAllLifeCycles(finishedRoot, currentTime, committedExpirationTime) {
12117 {
12118 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
12119
12120 if (warnAboutDeprecatedLifecycles) {
12121 ReactStrictModeWarnings.flushPendingDeprecationWarnings();
12122 }
12123 }
12124 while (nextEffect !== null) {
12125 var effectTag = nextEffect.effectTag;
12126
12127 if (effectTag & (Update | Callback)) {
12128 recordEffect();
12129 var current = nextEffect.alternate;
12130 commitLifeCycles(finishedRoot, current, nextEffect, currentTime, committedExpirationTime);
12131 }
12132
12133 if (effectTag & ErrLog) {
12134 commitErrorLogging(nextEffect, onUncaughtError);
12135 }
12136
12137 if (effectTag & Ref) {
12138 recordEffect();
12139 commitAttachRef(nextEffect);
12140 }
12141
12142 var next = nextEffect.nextEffect;
12143 // Ensure that we clean these up so that we don't accidentally keep them.
12144 // I'm not actually sure this matters because we can't reset firstEffect
12145 // and lastEffect since they're on every node, not just the effectful
12146 // ones. So we have to clean everything as we reuse nodes anyway.
12147 nextEffect.nextEffect = null;
12148 // Ensure that we reset the effectTag here so that we can rely on effect
12149 // tags to reason about the current life-cycle.
12150 nextEffect = next;
12151 }
12152 }
12153
12154 function isAlreadyFailedLegacyErrorBoundary(instance) {
12155 return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);

Callers

nothing calls this directly

Calls 4

recordEffectFunction · 0.70
commitLifeCyclesFunction · 0.70
commitErrorLoggingFunction · 0.70
commitAttachRefFunction · 0.70

Tested by

no test coverage detected