MCPcopy Create free account
hub / github.com/plotly/dash / mountIncompleteClassComponent

Function mountIncompleteClassComponent

dash/deps/react-dom@18.3.1.js:20055–20076  ·  view source on GitHub ↗
(_current, workInProgress, Component, nextProps, renderLanes)

Source from the content-addressed store, hash-verified

20053 }
20054
20055 function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {
20056 resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); // Promote the fiber to a class and try rendering again.
20057
20058 workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`
20059 // Push context providers early to prevent context stack mismatches.
20060 // During mounting we don't know the child context yet as the instance doesn't exist.
20061 // We will invalidate the child context in finishClassComponent() right after rendering.
20062
20063 var hasContext;
20064
20065 if (isContextProvider(Component)) {
20066 hasContext = true;
20067 pushContextProvider(workInProgress);
20068 } else {
20069 hasContext = false;
20070 }
20071
20072 prepareToReadContext(workInProgress, renderLanes);
20073 constructClassInstance(workInProgress, Component, nextProps);
20074 mountClassInstance(workInProgress, Component, nextProps, renderLanes);
20075 return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
20076 }
20077
20078 function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {
20079 resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);

Callers 1

beginWorkFunction · 0.70

Calls 7

isContextProviderFunction · 0.70
pushContextProviderFunction · 0.70
prepareToReadContextFunction · 0.70
constructClassInstanceFunction · 0.70
mountClassInstanceFunction · 0.70
finishClassComponentFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…