MCPcopy Index your code
hub / github.com/react/react / commitClassDidMount

Function commitClassDidMount

packages/react-reconciler/src/ReactFiberCommitEffects.js:496–515  ·  view source on GitHub ↗
(finishedWork: Fiber)

Source from the content-addressed store, hash-verified

494}
495
496export function commitClassDidMount(finishedWork: Fiber) {
497 // TODO: Check for LayoutStatic flag
498 const instance = finishedWork.stateNode;
499 if (typeof instance.componentDidMount === 'function') {
500 if (__DEV__) {
501 runWithFiberInDEV(
502 finishedWork,
503 callComponentDidMountInDEV,
504 finishedWork,
505 instance,
506 );
507 } else {
508 try {
509 instance.componentDidMount();
510 } catch (error) {
511 captureCommitPhaseError(finishedWork, finishedWork.return, error);
512 }
513 }
514 }
515}
516
517export function commitClassCallbacks(finishedWork: Fiber) {
518 // TODO: I think this is now always non-null by the time it reaches the

Callers 2

reappearLayoutEffectsFunction · 0.90

Calls 3

runWithFiberInDEVFunction · 0.90
captureCommitPhaseErrorFunction · 0.90
componentDidMountMethod · 0.65

Tested by

no test coverage detected