dillon1000/react

Commit

Don't warn about unmounted updates if pending passive unmount (#18096)

I recently landed a change to the timing of passive effect cleanup functions during unmount (see #17925). This change defers flushing of passive effects for unmounted components until later (whenever we next flush pending passive effects).

Since this change increases the likelihood of a (not actionable) state update warning for unmounted components, I've suppressed that warning for Fibers that have scheduled passive effect unmounts pending.
Browse files
Changed paths2 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.internal.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…