diff --git a/React 的深入探索/React 的流程解析 - Fiber 递归/React 的深入探索 - beginWork.md b/React 的深入探索/React 的流程解析 - Fiber 递归/React 的深入探索 - beginWork.md index ea61492..c7488bd 100644 --- a/React 的深入探索/React 的流程解析 - Fiber 递归/React 的深入探索 - beginWork.md +++ b/React 的深入探索/React 的流程解析 - Fiber 递归/React 的深入探索 - beginWork.md @@ -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 为空