[DOM] Unobserve fragment IntersectionObserver targets after exit (#37408)
Fragment IntersectionObserver targets used to stay observed after a child was removed so the exit record (isIntersecting: false) could still fire, but that left the observer holding detached nodes. We now unobserve ResizeObserver targets immediately, and delay IntersectionObserver unobserve until after paint so the exit still lands, then drop the strong ref. If the same node is reinserted before that flush, we cancel the pending unobserve so a later cleanup does not detach a child that’s still visible. Closes https://github.com/react/react/pull/37452/ Closes https://github.com/react/react/pull/37302 Fixes https://github.com/react/react/issues/37451
J
Jack Pope committed
065bc84eb50914fa1bc60983eac0b0b717186d74
Parent: ff7445e
Committed by GitHub <noreply@github.com>
on 8/31/2026, 5:13:24 PM