// Update the return pointer so the tree is consistent. This is a code // smell because it assumes the commit phase is never concurrent with // the render phase. Will address during refactor to alternate model. child.return = completedWork;
child = child.sibling; }
completedWork.subtreeFlags |= subtreeFlags; } else { // Bubble up the earliest expiration time. let child = completedWork.child; while (child !== null) { newChildLanes = mergeLanes( newChildLanes, mergeLanes(child.lanes, child.childLanes), );
// "Static" flags share the lifetime of the fiber/hook they belong to, // so we should bubble those up even during a bailout. All the other // flags have a lifetime only of a single render + commit, so we should // ignore them. subtreeFlags |= child.subtreeFlags & StaticMask; subtreeFlags |= child.flags & StaticMask;
// Update the return pointer so the tree is consistent. This is a code // smell because it assumes the commit phase is never concurrent with // the render phase. Will address during refactor to alternate model. child.return = completedWork;
switch (workInProgress.tag){ caseHostText: { const newText = newProps; if (current && workInProgress.stateNode != null) { const oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need // to schedule a side-effect to do the updates. updateHostText(current, workInProgress, oldText, newText); } else { const rootContainerInstance = getRootHostContainer(); const currentHostContext = getHostContext(); markCloned(workInProgress); workInProgress.stateNode = createTextInstance( newText, rootContainerInstance, currentHostContext, workInProgress, ); } bubbleProperties(workInProgress); returnnull; } }