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

Function cloneChildFibers

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

Source from the content-addressed store, hash-verified

9840var mountChildFibers = ChildReconciler(false);
9841
9842function cloneChildFibers(current, workInProgress) {
9843 !(current === null || workInProgress.child === current.child) ? invariant(false, 'Resuming work not yet implemented.') : void 0;
9844
9845 if (workInProgress.child === null) {
9846 return;
9847 }
9848
9849 var currentChild = workInProgress.child;
9850 var newChild = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
9851 workInProgress.child = newChild;
9852
9853 newChild['return'] = workInProgress;
9854 while (currentChild.sibling !== null) {
9855 currentChild = currentChild.sibling;
9856 newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
9857 newChild['return'] = workInProgress;
9858 }
9859 newChild.sibling = null;
9860}
9861
9862var didWarnAboutBadClass = void 0;
9863var didWarnAboutGetDerivedStateOnFunctionalComponent = void 0;

Callers 1

Calls 2

invariantFunction · 0.70
createWorkInProgressFunction · 0.70

Tested by

no test coverage detected