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