dillon1000/react

Commit

Switch to mount dispatcher after use() when needed (#26232)

When resuming a suspended render, there may be more Hooks to be called
that weren't seen the previous time through. Make sure to switch to the
mount dispatcher when calling use() if the next Hook call should be
treated as a mount.

Fixes #25964.
Browse files
Changed paths4 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberHooks.js ModifiedM packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js ModifiedM packages/react-reconciler/src/__tests__/ReactThenable-test.js ModifiedM scripts/error-codes/codes.json Modified
Patch

Files changed

Rendering syntax-highlighted changes…