MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / commitAllLifeCycles

Function commitAllLifeCycles

code/event-handlers/public/app.js:12213–12249  ·  view source on GitHub ↗
(finishedRoot, currentTime, committedExpirationTime)

Source from the content-addressed store, hash-verified

12211 }
12212
12213 function commitAllLifeCycles(finishedRoot, currentTime, committedExpirationTime) {
12214 {
12215 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
12216
12217 if (warnAboutDeprecatedLifecycles) {
12218 ReactStrictModeWarnings.flushPendingDeprecationWarnings();
12219 }
12220 }
12221 while (nextEffect !== null) {
12222 var effectTag = nextEffect.effectTag;
12223
12224 if (effectTag & (Update | Callback)) {
12225 recordEffect();
12226 var current = nextEffect.alternate;
12227 commitLifeCycles(finishedRoot, current, nextEffect, currentTime, committedExpirationTime);
12228 }
12229
12230 if (effectTag & ErrLog) {
12231 commitErrorLogging(nextEffect, onUncaughtError);
12232 }
12233
12234 if (effectTag & Ref) {
12235 recordEffect();
12236 commitAttachRef(nextEffect);
12237 }
12238
12239 var next = nextEffect.nextEffect;
12240 // Ensure that we clean these up so that we don't accidentally keep them.
12241 // I'm not actually sure this matters because we can't reset firstEffect
12242 // and lastEffect since they're on every node, not just the effectful
12243 // ones. So we have to clean everything as we reuse nodes anyway.
12244 nextEffect.nextEffect = null;
12245 // Ensure that we reset the effectTag here so that we can rely on effect
12246 // tags to reason about the current life-cycle.
12247 nextEffect = next;
12248 }
12249 }
12250
12251 function isAlreadyFailedLegacyErrorBoundary(instance) {
12252 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