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

Function commitAllLifeCycles

code/dependency-injection/public/app.js:12976–13012  ·  view source on GitHub ↗
(finishedRoot, currentTime, committedExpirationTime)

Source from the content-addressed store, hash-verified

12974 }
12975
12976 function commitAllLifeCycles(finishedRoot, currentTime, committedExpirationTime) {
12977 {
12978 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
12979
12980 if (warnAboutDeprecatedLifecycles) {
12981 ReactStrictModeWarnings.flushPendingDeprecationWarnings();
12982 }
12983 }
12984 while (nextEffect !== null) {
12985 var effectTag = nextEffect.effectTag;
12986
12987 if (effectTag & (Update | Callback)) {
12988 recordEffect();
12989 var current = nextEffect.alternate;
12990 commitLifeCycles(finishedRoot, current, nextEffect, currentTime, committedExpirationTime);
12991 }
12992
12993 if (effectTag & ErrLog) {
12994 commitErrorLogging(nextEffect, onUncaughtError);
12995 }
12996
12997 if (effectTag & Ref) {
12998 recordEffect();
12999 commitAttachRef(nextEffect);
13000 }
13001
13002 var next = nextEffect.nextEffect;
13003 // Ensure that we clean these up so that we don't accidentally keep them.
13004 // I'm not actually sure this matters because we can't reset firstEffect
13005 // and lastEffect since they're on every node, not just the effectful
13006 // ones. So we have to clean everything as we reuse nodes anyway.
13007 nextEffect.nextEffect = null;
13008 // Ensure that we reset the effectTag here so that we can rely on effect
13009 // tags to reason about the current life-cycle.
13010 nextEffect = next;
13011 }
13012 }
13013
13014 function isAlreadyFailedLegacyErrorBoundary(instance) {
13015 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