mountIncompleteClassComponent() — react Function Reference
Architecture documentation for the mountIncompleteClassComponent() function in ReactFiberBeginWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 0516fb13_8886_d15c_4bfa_1bd5d35db45d["mountIncompleteClassComponent()"] 0be70812_cc0c_b210_f84f_8e61dd5f831c["ReactFiberBeginWork.js"] 0516fb13_8886_d15c_4bfa_1bd5d35db45d -->|defined in| 0be70812_cc0c_b210_f84f_8e61dd5f831c 235e1db1_02a4_912f_7d82_ea6636c850c0["beginWork()"] 235e1db1_02a4_912f_7d82_ea6636c850c0 -->|calls| 0516fb13_8886_d15c_4bfa_1bd5d35db45d 365b3bf6_96da_115f_49cb_3cce0265b371["resetSuspendedCurrentOnMountInLegacyMode()"] 0516fb13_8886_d15c_4bfa_1bd5d35db45d -->|calls| 365b3bf6_96da_115f_49cb_3cce0265b371 fec6f182_8acb_a259_b114_e6d1db8ac64b["finishClassComponent()"] 0516fb13_8886_d15c_4bfa_1bd5d35db45d -->|calls| fec6f182_8acb_a259_b114_e6d1db8ac64b 0557b097_fe16_f352_4804_dd4ff4366808["constructClassInstance()"] 0516fb13_8886_d15c_4bfa_1bd5d35db45d -->|calls| 0557b097_fe16_f352_4804_dd4ff4366808 3d21bb44_e12a_666f_ff91_4155c0f8d71b["mountClassInstance()"] 0516fb13_8886_d15c_4bfa_1bd5d35db45d -->|calls| 3d21bb44_e12a_666f_ff91_4155c0f8d71b style 0516fb13_8886_d15c_4bfa_1bd5d35db45d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberBeginWork.js lines 2173–2210
function mountIncompleteClassComponent(
_current: null | Fiber,
workInProgress: Fiber,
Component: any,
nextProps: any,
renderLanes: Lanes,
) {
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
// Promote the fiber to a class and try rendering again.
workInProgress.tag = ClassComponent;
// The rest of this function is a fork of `updateClassComponent`
// Push context providers early to prevent context stack mismatches.
// During mounting we don't know the child context yet as the instance doesn't exist.
// We will invalidate the child context in finishClassComponent() right after rendering.
let hasContext;
if (isLegacyContextProvider(Component)) {
hasContext = true;
pushLegacyContextProvider(workInProgress);
} else {
hasContext = false;
}
prepareToReadContext(workInProgress, renderLanes);
constructClassInstance(workInProgress, Component, nextProps);
mountClassInstance(workInProgress, Component, nextProps, renderLanes);
return finishClassComponent(
null,
workInProgress,
Component,
true,
hasContext,
renderLanes,
);
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does mountIncompleteClassComponent() do?
mountIncompleteClassComponent() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberBeginWork.js.
Where is mountIncompleteClassComponent() defined?
mountIncompleteClassComponent() is defined in packages/react-reconciler/src/ReactFiberBeginWork.js at line 2173.
What does mountIncompleteClassComponent() call?
mountIncompleteClassComponent() calls 4 function(s): constructClassInstance, finishClassComponent, mountClassInstance, resetSuspendedCurrentOnMountInLegacyMode.
What calls mountIncompleteClassComponent()?
mountIncompleteClassComponent() is called by 1 function(s): beginWork.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free