MCPcopy Index your code
hub / github.com/caseywebdev/react-list / createWorkInProgress

Function createWorkInProgress

docs/index.js:12882–12918  ·  view source on GitHub ↗
(current, pendingProps)

Source from the content-addressed store, hash-verified

12880 return !(!Component || !Component.isReactComponent);
12881}
12882function createWorkInProgress(current, pendingProps) {
12883 var workInProgress = current.alternate;
12884 null === workInProgress
12885 ? ((workInProgress = createFiberImplClass(
12886 current.tag,
12887 pendingProps,
12888 current.key,
12889 current.mode
12890 )),
12891 (workInProgress.elementType = current.elementType),
12892 (workInProgress.type = current.type),
12893 (workInProgress.stateNode = current.stateNode),
12894 (workInProgress.alternate = current),
12895 (current.alternate = workInProgress))
12896 : ((workInProgress.pendingProps = pendingProps),
12897 (workInProgress.type = current.type),
12898 (workInProgress.flags = 0),
12899 (workInProgress.subtreeFlags = 0),
12900 (workInProgress.deletions = null));
12901 workInProgress.flags = current.flags & 31457280;
12902 workInProgress.childLanes = current.childLanes;
12903 workInProgress.lanes = current.lanes;
12904 workInProgress.child = current.child;
12905 workInProgress.memoizedProps = current.memoizedProps;
12906 workInProgress.memoizedState = current.memoizedState;
12907 workInProgress.updateQueue = current.updateQueue;
12908 pendingProps = current.dependencies;
12909 workInProgress.dependencies =
12910 null === pendingProps
12911 ? null
12912 : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext };
12913 workInProgress.sibling = current.sibling;
12914 workInProgress.index = current.index;
12915 workInProgress.ref = current.ref;
12916 workInProgress.refCleanup = current.refCleanup;
12917 return workInProgress;
12918}
12919function resetWorkInProgress(workInProgress, renderLanes) {
12920 workInProgress.flags &= 31457282;
12921 var current = workInProgress.alternate;

Callers 5

useFiberFunction · 0.85
updateMemoComponentFunction · 0.85
updateSuspenseComponentFunction · 0.85
prepareFreshStackFunction · 0.85

Calls 4

createFiberImplClassFunction · 0.85
createFiberFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…