mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
9d3ed27e04
Insertion effects do not unmount when a subtree is removed while
offscreen.
Current behavior for an insertion effect is if the component goes
- *visible -> removed:* calls insertion effect cleanup
- *visible -> offscreen -> removed:* insertion effect cleanup is never
called
This makes it so we always call insertion effect cleanup when removing
the component.
Likely also fixes https://github.com/facebook/react/issues/26670
---------
Co-authored-by: Rick Hanlon <rickhanlonii@fb.com>
DiffTrain build for [d3d4d3a46b](https://github.com/facebook/react/commit/d3d4d3a46b014ab0f6edc443c19fcdba09105f20)