dillon1000/react

Commit

[Fast Refresh] Find and remount wrapper edits behind lazy() (#36965)

Two bugs:

- Type changes to a lazy's inner component (e.g., adding a `memo`
  comparison function) were missed by the refresh scan.
- If a SimpleMemoComponent needs to be remounted, previously
  resolveRemountTypeForHotReloading would return the inner function
  and we would incorrectly recreate the fiber as a FunctionComponent.
  Instead, we can just use elementType consistently now that the
  beginWork functions consistently call resolveFamily on the wrapped
  components.
Browse files
Changed paths3 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberBeginWork.js ModifiedM packages/react-reconciler/src/ReactFiberHotReloading.js ModifiedM packages/react-refresh/src/__tests__/ReactFresh-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…