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

Function commitAllLifeCycles

code/communication/public/app.js:12918–12954  ·  view source on GitHub ↗
(finishedRoot, currentTime, committedExpirationTime)

Source from the content-addressed store, hash-verified

12916 }
12917
12918 function commitAllLifeCycles(finishedRoot, currentTime, committedExpirationTime) {
12919 {
12920 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
12921
12922 if (warnAboutDeprecatedLifecycles) {
12923 ReactStrictModeWarnings.flushPendingDeprecationWarnings();
12924 }
12925 }
12926 while (nextEffect !== null) {
12927 var effectTag = nextEffect.effectTag;
12928
12929 if (effectTag & (Update | Callback)) {
12930 recordEffect();
12931 var current = nextEffect.alternate;
12932 commitLifeCycles(finishedRoot, current, nextEffect, currentTime, committedExpirationTime);
12933 }
12934
12935 if (effectTag & ErrLog) {
12936 commitErrorLogging(nextEffect, onUncaughtError);
12937 }
12938
12939 if (effectTag & Ref) {
12940 recordEffect();
12941 commitAttachRef(nextEffect);
12942 }
12943
12944 var next = nextEffect.nextEffect;
12945 // Ensure that we clean these up so that we don't accidentally keep them.
12946 // I'm not actually sure this matters because we can't reset firstEffect
12947 // and lastEffect since they're on every node, not just the effectful
12948 // ones. So we have to clean everything as we reuse nodes anyway.
12949 nextEffect.nextEffect = null;
12950 // Ensure that we reset the effectTag here so that we can rely on effect
12951 // tags to reason about the current life-cycle.
12952 nextEffect = next;
12953 }
12954 }
12955
12956 function isAlreadyFailedLegacyErrorBoundary(instance) {
12957 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