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

Function commitAllLifeCycles

code/new-context-api/public/app.js:12244–12280  ·  view source on GitHub ↗
(finishedRoot, currentTime, committedExpirationTime)

Source from the content-addressed store, hash-verified

12242 }
12243
12244 function commitAllLifeCycles(finishedRoot, currentTime, committedExpirationTime) {
12245 {
12246 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
12247
12248 if (warnAboutDeprecatedLifecycles) {
12249 ReactStrictModeWarnings.flushPendingDeprecationWarnings();
12250 }
12251 }
12252 while (nextEffect !== null) {
12253 var effectTag = nextEffect.effectTag;
12254
12255 if (effectTag & (Update | Callback)) {
12256 recordEffect();
12257 var current = nextEffect.alternate;
12258 commitLifeCycles(finishedRoot, current, nextEffect, currentTime, committedExpirationTime);
12259 }
12260
12261 if (effectTag & ErrLog) {
12262 commitErrorLogging(nextEffect, onUncaughtError);
12263 }
12264
12265 if (effectTag & Ref) {
12266 recordEffect();
12267 commitAttachRef(nextEffect);
12268 }
12269
12270 var next = nextEffect.nextEffect;
12271 // Ensure that we clean these up so that we don't accidentally keep them.
12272 // I'm not actually sure this matters because we can't reset firstEffect
12273 // and lastEffect since they're on every node, not just the effectful
12274 // ones. So we have to clean everything as we reuse nodes anyway.
12275 nextEffect.nextEffect = null;
12276 // Ensure that we reset the effectTag here so that we can rely on effect
12277 // tags to reason about the current life-cycle.
12278 nextEffect = next;
12279 }
12280 }
12281
12282 function isAlreadyFailedLegacyErrorBoundary(instance) {
12283 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