mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
d3d4d3a46b
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>