MCPcopy Create free account
hub / github.com/reactjs/react-rails / reconcileChildren

Function reconcileChildren

lib/assets/react-source/development/react.js:20451–20466  ·  view source on GitHub ↗
(current, workInProgress, nextChildren, renderExpirationTime)

Source from the content-addressed store, hash-verified

20449 }
20450
20451 function reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime) {
20452 if (current === null) {
20453 // If this is a fresh new component that hasn't been rendered yet, we
20454 // won't update its child set by applying minimal side-effects. Instead,
20455 // we will add them all to the child before it gets rendered. That means
20456 // we can optimize this reconciliation pass by not tracking side-effects.
20457 workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
20458 } else {
20459 // If the current child is the same as the work in progress, it means that
20460 // we haven't yet started any work on these children. Therefore, we use
20461 // the clone algorithm to create a copy of all the current children.
20462 // If we had any progressed work already, that is invalid at this point so
20463 // let's throw it out.
20464 workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);
20465 }
20466 }
20467
20468 function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime) {
20469 // This function is fork of reconcileChildren. It's used in cases where we

Callers 13

updateForwardRefFunction · 0.85
updateFragmentFunction · 0.85
updateModeFunction · 0.85
updateProfilerFunction · 0.85
updateFunctionComponentFunction · 0.85
finishClassComponentFunction · 0.85
updateHostRootFunction · 0.85
updateHostComponentFunction · 0.85
updatePortalComponentFunction · 0.85
updateContextProviderFunction · 0.85

Calls 1

reconcileChildFibersFunction · 0.85

Tested by

no test coverage detected