diff --git a/React 的源码深入/React 的流程解析 - commit 阶段/React 的流程解析 - commit阶段.md b/React 的源码深入/React 的流程解析 - commit 阶段/React 的流程解析 - commit阶段.md index 24d4c90..b94ae07 100644 --- a/React 的源码深入/React 的流程解析 - commit 阶段/React 的流程解析 - commit阶段.md +++ b/React 的源码深入/React 的流程解析 - commit 阶段/React 的流程解析 - commit阶段.md @@ -28,4 +28,19 @@ root.finishedLanes = NoLanes; root.callbackNode = null; root.callbackPriority = NoLane; + +// 内部位运算 +var remainingLanes = mergeLanes( + finishedWork.lanes, + finishedWork.childLanes +); + +// 内部也是位运算 +markRootFinished(root, remainingLanes); + +if (root === workInProgressRoot) { + workInProgressRoot = null; + workInProgress = null; + workInProgressRootRenderLanes = NoLanes; +} ``` \ No newline at end of file