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

Function updateCallComponent

code/third-party/public/app.js:9408–9434  ·  view source on GitHub ↗
(current, workInProgress, renderExpirationTime)

Source from the content-addressed store, hash-verified

9406 }
9407
9408 function updateCallComponent(current, workInProgress, renderExpirationTime) {
9409 var nextProps = workInProgress.pendingProps;
9410 if (hasLegacyContextChanged()) {
9411 // Normally we can bail out on props equality but if context has changed
9412 // we don't do the bailout and we have to reuse existing props instead.
9413 } else if (workInProgress.memoizedProps === nextProps) {
9414 nextProps = workInProgress.memoizedProps;
9415 // TODO: When bailing out, we might need to return the stateNode instead
9416 // of the child. To check it for work.
9417 // return bailoutOnAlreadyFinishedWork(current, workInProgress);
9418 }
9419
9420 var nextChildren = nextProps.children;
9421
9422 // The following is a fork of reconcileChildrenAtExpirationTime but using
9423 // stateNode to store the child.
9424 if (current === null) {
9425 workInProgress.stateNode = mountChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
9426 } else {
9427 workInProgress.stateNode = reconcileChildFibers(workInProgress, current.stateNode, nextChildren, renderExpirationTime);
9428 }
9429
9430 memoizeProps(workInProgress, nextProps);
9431 // This doesn't take arbitrary time so we could synchronously just begin
9432 // eagerly do the work of workInProgress.child as an optimization.
9433 return workInProgress.stateNode;
9434 }
9435
9436 function updatePortalComponent(current, workInProgress, renderExpirationTime) {
9437 pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);

Callers 1

beginWorkFunction · 0.70

Calls 2

reconcileChildFibersFunction · 0.70
memoizePropsFunction · 0.70

Tested by

no test coverage detected