mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
cfae0a1f78
ScrollTrigger kept onVisible in its effect dependencies, and both callers hand in a fresh arrow on every render: the picker its loadMorePhotos, the gallery its setVisibleCount step. So every unrelated re-render, a photo being ticked included, disconnected the IntersectionObserver and observed again, and each observe() replays the initial callback. The callback moves into a ref. loading stays a dependency, because re-observing once a page has landed is the only thing that still produces a callback when the sentinel never left the 200px margin, so folding that into a ref too would leave paging dead after the first page. FE-COMP-JSCROLLTRIG-009 pins that, 007 and 008 pin the rebuild itself; both are red on the old component. Markup, classes and the signature are untouched.