dillon1000/react

Commit

[Fresh] Retry failed roots on refresh (#15966)

* Retry failed roots on refresh

* Don't prevent retry after error -> render(null) special case

The check wasn't very resilient because in Concurrent Mode it looks like we can get further follow-up commits even if we captured an error. So we can't reliably distinguish the case where after an error you _manually_ rendered null.

Retrying on an edit after a tree failed _and_ you rendered null in the same tree seems fine. It's also very unlikely a pattern like this actually exists in the wild.
Browse files
Changed paths5 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberDevToolsHook.js ModifiedM packages/react-reconciler/src/ReactFiberHotReloading.js ModifiedM packages/react-reconciler/src/ReactFiberReconciler.js ModifiedM packages/react-refresh/src/ReactFreshRuntime.js ModifiedM packages/react-refresh/src/__tests__/ReactFresh-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…