1
0
Fork 0
Browse Source

vault backup: 2022-06-28 10:28:53

master
YuJian 2 years ago
parent
commit
3fd1aac18c
  1. 16
      React 的深入探索/React 的流程解析 - Fiber 递归/React 的深入探索 - beginWork.md

16
React 的深入探索/React 的流程解析 - Fiber 递归/React 的深入探索 - beginWork.md

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

Loading…
Cancel
Save