dillon1000/react
Commit
Browse files Fix bugs related to unmounting error boundaries (#10403)
* Don't warn about setState on unmounted when scheduling error recovery We shouldn't schedule an update on unmounted error boundaries, but we don't know if a boundary is unmounted until we traverse its parents. Added an additional argument to scheduleUpdate so we know not to warn about setState on unmounted components. * Should be able to unmount an error boundary before it is handled Fixes the case where an error boundary captures an error, but its parent is unmounted before we can re-render it. componentDidCatch is never called, and we don't remove the boundary from our set of unhandled error boundaries. We should not assume that if capturedErrors is non-null that we still have unhandled errors.
Changed paths2 files
First-parent comparisonsrc/renderers/shared/fiber/ReactFiberScheduler.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncrementalErrorHandling-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…