dillon1000/react
Commit
Browse files Fix context stack misalignment caused by error replay (#12508)
* Add regression tests for error boundary replay bugs * Ensure the context stack is aligned if renderer throws * Always throw when replaying a failed unit of work Replaying a failed unit of work should always throw, because the render phase is meant to be idempotent, If it doesn't throw, rethrow the original error, so React's internal stack is not misaligned. * Reset originalReplayError after replaying * Typo fix
Changed paths3 files
First-parent comparisonpackages/react-reconciler/src/ReactFiberHostContext.js ModifiedM packages/react-reconciler/src/ReactFiberScheduler.js ModifiedA packages/react-reconciler/src/__tests__/ReactIncrementalErrorReplay-test.js AddedPatch
Files changed
Rendering syntax-highlighted changes…