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

Function commitHostMount

packages/react-reconciler/src/ReactFiberCommitHostEffects.js:69–89  ·  view source on GitHub ↗
(finishedWork: Fiber)

Source from the content-addressed store, hash-verified

67import {enableFragmentRefs} from 'shared/ReactFeatureFlags';
68
69export function commitHostMount(finishedWork: Fiber) {
70 const type = finishedWork.type;
71 const props = finishedWork.memoizedProps;
72 const instance: Instance = finishedWork.stateNode;
73 try {
74 if (__DEV__) {
75 runWithFiberInDEV(
76 finishedWork,
77 commitMount,
78 instance,
79 type,
80 props,
81 finishedWork,
82 );
83 } else {
84 commitMount(instance, type, props, finishedWork);
85 }
86 } catch (error) {
87 captureCommitPhaseError(finishedWork, finishedWork.return, error);
88 }
89}
90
91export function commitHostHydratedInstance(finishedWork: Fiber) {
92 const type = finishedWork.type;

Callers 2

reappearLayoutEffectsFunction · 0.90

Calls 3

runWithFiberInDEVFunction · 0.90
commitMountFunction · 0.90
captureCommitPhaseErrorFunction · 0.90

Tested by

no test coverage detected