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

Function cloneChildFibers

code/new-context-api/public/app.js:9065–9083  ·  view source on GitHub ↗
(current, workInProgress)

Source from the content-addressed store, hash-verified

9063var mountChildFibers = ChildReconciler(false);
9064
9065function cloneChildFibers(current, workInProgress) {
9066 !(current === null || workInProgress.child === current.child) ? invariant(false, 'Resuming work not yet implemented.') : void 0;
9067
9068 if (workInProgress.child === null) {
9069 return;
9070 }
9071
9072 var currentChild = workInProgress.child;
9073 var newChild = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
9074 workInProgress.child = newChild;
9075
9076 newChild['return'] = workInProgress;
9077 while (currentChild.sibling !== null) {
9078 currentChild = currentChild.sibling;
9079 newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
9080 newChild['return'] = workInProgress;
9081 }
9082 newChild.sibling = null;
9083}
9084
9085var didWarnAboutBadClass = void 0;
9086var didWarnAboutGetDerivedStateOnFunctionalComponent = void 0;

Callers 1

Calls 2

invariantFunction · 0.70
createWorkInProgressFunction · 0.70

Tested by

no test coverage detected