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

Function updateCallComponent

code/redux/public/app.js:10426–10452  ·  view source on GitHub ↗
(current, workInProgress, renderExpirationTime)

Source from the content-addressed store, hash-verified

10424 }
10425
10426 function updateCallComponent(current, workInProgress, renderExpirationTime) {
10427 var nextProps = workInProgress.pendingProps;
10428 if (hasLegacyContextChanged()) {
10429 // Normally we can bail out on props equality but if context has changed
10430 // we don't do the bailout and we have to reuse existing props instead.
10431 } else if (workInProgress.memoizedProps === nextProps) {
10432 nextProps = workInProgress.memoizedProps;
10433 // TODO: When bailing out, we might need to return the stateNode instead
10434 // of the child. To check it for work.
10435 // return bailoutOnAlreadyFinishedWork(current, workInProgress);
10436 }
10437
10438 var nextChildren = nextProps.children;
10439
10440 // The following is a fork of reconcileChildrenAtExpirationTime but using
10441 // stateNode to store the child.
10442 if (current === null) {
10443 workInProgress.stateNode = mountChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
10444 } else {
10445 workInProgress.stateNode = reconcileChildFibers(workInProgress, current.stateNode, nextChildren, renderExpirationTime);
10446 }
10447
10448 memoizeProps(workInProgress, nextProps);
10449 // This doesn't take arbitrary time so we could synchronously just begin
10450 // eagerly do the work of workInProgress.child as an optimization.
10451 return workInProgress.stateNode;
10452 }
10453
10454 function updatePortalComponent(current, workInProgress, renderExpirationTime) {
10455 pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);

Callers 1

beginWorkFunction · 0.70

Calls 2

reconcileChildFibersFunction · 0.70
memoizePropsFunction · 0.70

Tested by

no test coverage detected