dillon1000/react

Commit

[Fresh] Don't traverse remounted trees (#15685)

* Don't traverse children when hot reloading needs a remount

If we're gonna remount that tree anyway, there is no use in traversing its children beforehand.

* Add a test verifying hot reload batches updates

Otherwise there is a risk of it being super slow due to cascades.
Browse files
Changed paths2 files
First-parent comparison
M packages/react-dom/src/__tests__/ReactFresh-test.internal.js ModifiedM packages/react-reconciler/src/ReactFiberHotReloading.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…