MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / updateCallComponent

Function updateCallComponent

code/communication/public/app.js:10210–10236  ·  view source on GitHub ↗
(current, workInProgress, renderExpirationTime)

Source from the content-addressed store, hash-verified

10208 }
10209
10210 function updateCallComponent(current, workInProgress, renderExpirationTime) {
10211 var nextProps = workInProgress.pendingProps;
10212 if (hasLegacyContextChanged()) {
10213 // Normally we can bail out on props equality but if context has changed
10214 // we don't do the bailout and we have to reuse existing props instead.
10215 } else if (workInProgress.memoizedProps === nextProps) {
10216 nextProps = workInProgress.memoizedProps;
10217 // TODO: When bailing out, we might need to return the stateNode instead
10218 // of the child. To check it for work.
10219 // return bailoutOnAlreadyFinishedWork(current, workInProgress);
10220 }
10221
10222 var nextChildren = nextProps.children;
10223
10224 // The following is a fork of reconcileChildrenAtExpirationTime but using
10225 // stateNode to store the child.
10226 if (current === null) {
10227 workInProgress.stateNode = mountChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
10228 } else {
10229 workInProgress.stateNode = reconcileChildFibers(workInProgress, current.stateNode, nextChildren, renderExpirationTime);
10230 }
10231
10232 memoizeProps(workInProgress, nextProps);
10233 // This doesn't take arbitrary time so we could synchronously just begin
10234 // eagerly do the work of workInProgress.child as an optimization.
10235 return workInProgress.stateNode;
10236 }
10237
10238 function updatePortalComponent(current, workInProgress, renderExpirationTime) {
10239 pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);

Callers 1

beginWorkFunction · 0.70

Calls 2

reconcileChildFibersFunction · 0.70
memoizePropsFunction · 0.70

Tested by

no test coverage detected