1
0
Fork 0
Browse Source

vault backup: 2022-04-26 16:02:42

master
YuJian 3 years ago
parent
commit
092e02ed58
  1. 15
      React 的源码深入/React 的流程解析 - commit 阶段/React 的流程解析 - commit阶段.md

15
React 的源码深入/React 的流程解析 - commit 阶段/React 的流程解析 - commit阶段.md

@ -28,4 +28,19 @@ root.finishedLanes = NoLanes;
root.callbackNode = null; root.callbackNode = null;
root.callbackPriority = NoLane; root.callbackPriority = NoLane;
// 内部位运算
var remainingLanes = mergeLanes(
finishedWork.lanes,
finishedWork.childLanes
);
// 内部也是位运算
markRootFinished(root, remainingLanes);
if (root === workInProgressRoot) {
workInProgressRoot = null;
workInProgress = null;
workInProgressRootRenderLanes = NoLanes;
}
``` ```
Loading…
Cancel
Save