|
|
|
@ -66,10 +66,26 @@ if (
@@ -66,10 +66,26 @@ if (
|
|
|
|
|
如果判断条件为 false,会进入后续判断逻辑 |
|
|
|
|
|
|
|
|
|
```javascript |
|
|
|
|
// props 和 context 都没有发生变化,检查优先级相关 |
|
|
|
|
var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes); |
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
!hasScheduledUpdateOrContext && |
|
|
|
|
(workInProgress.flags & DidCapture) === NoFlags |
|
|
|
|
) { |
|
|
|
|
didReceiveUpdate = false; |
|
|
|
|
return attemptEarlyBailoutIfNoScheduledUpdate( |
|
|
|
|
current, |
|
|
|
|
workInProgress, |
|
|
|
|
renderLanes |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) { |
|
|
|
|
didReceiveUpdate = true; |
|
|
|
|
} else { |
|
|
|
|
didReceiveUpdate = false; |
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
### current 为空 |
|
|
|
|