MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / updateCallComponent

Function updateCallComponent

code/composition/public/app.js:10313–10339  ·  view source on GitHub ↗
(current, workInProgress, renderExpirationTime)

Source from the content-addressed store, hash-verified

10311 }
10312
10313 function updateCallComponent(current, workInProgress, renderExpirationTime) {
10314 var nextProps = workInProgress.pendingProps;
10315 if (hasLegacyContextChanged()) {
10316 // Normally we can bail out on props equality but if context has changed
10317 // we don't do the bailout and we have to reuse existing props instead.
10318 } else if (workInProgress.memoizedProps === nextProps) {
10319 nextProps = workInProgress.memoizedProps;
10320 // TODO: When bailing out, we might need to return the stateNode instead
10321 // of the child. To check it for work.
10322 // return bailoutOnAlreadyFinishedWork(current, workInProgress);
10323 }
10324
10325 var nextChildren = nextProps.children;
10326
10327 // The following is a fork of reconcileChildrenAtExpirationTime but using
10328 // stateNode to store the child.
10329 if (current === null) {
10330 workInProgress.stateNode = mountChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
10331 } else {
10332 workInProgress.stateNode = reconcileChildFibers(workInProgress, current.stateNode, nextChildren, renderExpirationTime);
10333 }
10334
10335 memoizeProps(workInProgress, nextProps);
10336 // This doesn't take arbitrary time so we could synchronously just begin
10337 // eagerly do the work of workInProgress.child as an optimization.
10338 return workInProgress.stateNode;
10339 }
10340
10341 function updatePortalComponent(current, workInProgress, renderExpirationTime) {
10342 pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);

Callers 1

beginWorkFunction · 0.70

Calls 2

reconcileChildFibersFunction · 0.70
memoizePropsFunction · 0.70

Tested by

no test coverage detected