1
0
Fork 0
Browse Source

vault backup: 2022-04-26 16:42:42

master
YuJian 3 years ago
parent
commit
500fa709b2
  1. 15
      React 的源码深入/React 的流程解析 - commit 阶段/React 的流程解析 - commit阶段.md

15
React 的源码深入/React 的流程解析 - commit 阶段/React 的流程解析 - commit阶段.md

@ -97,26 +97,19 @@ invokeGuardedCallback( @@ -97,26 +97,19 @@ invokeGuardedCallback(
renderPriorityLevel
);
if (hasCaughtError()) {
if (!(nextEffect !== null)) {
{
throw Error( "Should be working on an effect." );
}
}
var _error = clearCaughtError();
captureCommitPhaseError(nextEffect, _error);
nextEffect = nextEffect.nextEffect;
}
}
} while (nextEffect !== null);
```
和 before 的循环非常类似,commitMutationEffects 也是有 invokeGuardedCallback 调用,也有着相同 Error Boundaries 的逻辑
关于 commitMutationEffects: [[React 的深入探索 - commitMutationEffects]]

Loading…
Cancel
Save