MCPcopy Index your code
hub / github.com/caseywebdev/react-list / commitLayoutEffectOnFiber

Function commitLayoutEffectOnFiber

docs/index.js:11375–11481  ·  view source on GitHub ↗
(finishedRoot, current, finishedWork)

Source from the content-addressed store, hash-verified

11373 return resolvedPrevProps;
11374}
11375function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
11376 var flags = finishedWork.flags;
11377 switch (finishedWork.tag) {
11378 case 0:
11379 case 11:
11380 case 15:
11381 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
11382 flags & 4 && commitHookEffectListMount(5, finishedWork);
11383 break;
11384 case 1:
11385 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
11386 if (flags & 4)
11387 if (((finishedRoot = finishedWork.stateNode), null === current))
11388 try {
11389 finishedRoot.componentDidMount();
11390 } catch (error) {
11391 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11392 }
11393 else {
11394 var prevProps = resolveClassComponentProps(
11395 finishedWork.type,
11396 current.memoizedProps
11397 );
11398 current = current.memoizedState;
11399 try {
11400 finishedRoot.componentDidUpdate(
11401 prevProps,
11402 current,
11403 finishedRoot.__reactInternalSnapshotBeforeUpdate
11404 );
11405 } catch (error$111) {
11406 captureCommitPhaseError(
11407 finishedWork,
11408 finishedWork.return,
11409 error$111
11410 );
11411 }
11412 }
11413 flags & 64 && commitClassCallbacks(finishedWork);
11414 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
11415 break;
11416 case 3:
11417 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
11418 if (flags & 64 && ((flags = finishedWork.updateQueue), null !== flags)) {
11419 finishedRoot = null;
11420 if (null !== finishedWork.child)
11421 switch (finishedWork.child.tag) {
11422 case 27:
11423 case 5:
11424 finishedRoot = finishedWork.child.stateNode;
11425 break;
11426 case 1:
11427 finishedRoot = finishedWork.child.stateNode;
11428 }
11429 try {
11430 commitCallbacks(flags, finishedRoot);
11431 } catch (error) {
11432 captureCommitPhaseError(finishedWork, finishedWork.return, error);

Callers 3

commitRootImplFunction · 0.85
commitLayoutEffectsFunction · 0.85

Calls 15

captureCommitPhaseErrorFunction · 0.85
commitClassCallbacksFunction · 0.85
safelyAttachRefFunction · 0.85
commitCallbacksFunction · 0.85
commitHostMountFunction · 0.85
safelyDetachRefFunction · 0.85
commitHookLayoutEffectsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…