|
|
@ -20,7 +20,7 @@ do { |
|
|
|
flushRenderPhaseStrictModeWarningsInDEV(); |
|
|
|
flushRenderPhaseStrictModeWarningsInDEV(); |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
中间跳过一段逻辑无关和 performance 监控代码,进入对 Fiber Tree 属性的一系列初始化 |
|
|
|
中间跳过一段逻辑无关和 performance 监控代码,进入对 Fiber Tree 和 effecrList 的一系列初始化 |
|
|
|
|
|
|
|
|
|
|
|
```javascript |
|
|
|
```javascript |
|
|
|
root.finishedWork = null; |
|
|
|
root.finishedWork = null; |
|
|
@ -38,6 +38,15 @@ var remainingLanes = mergeLanes( |
|
|
|
// 内部也是位运算 |
|
|
|
// 内部也是位运算 |
|
|
|
markRootFinished(root, remainingLanes); |
|
|
|
markRootFinished(root, remainingLanes); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (rootsWithPendingDiscreteUpdates !== null) { |
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
|
|
!hasDiscreteLanes(remainingLanes) && |
|
|
|
|
|
|
|
rootsWithPendingDiscreteUpdates.has(root) |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
rootsWithPendingDiscreteUpdates.delete(root); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (root === workInProgressRoot) { |
|
|
|
if (root === workInProgressRoot) { |
|
|
|
workInProgressRoot = null; |
|
|
|
workInProgressRoot = null; |
|
|
|
workInProgress = null; |
|
|
|
workInProgress = null; |
|
|
|