From 092e02ed58033dc6ca94c41cd69740a03602f76d Mon Sep 17 00:00:00 2001 From: YuJian Date: Tue, 26 Apr 2022 16:02:42 +0800 Subject: [PATCH] vault backup: 2022-04-26 16:02:42 --- .../React 的流程解析 - commit阶段.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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