Attaches an IntersectionObserver to a sentinel element.
When the sentinel enters the scroll container (or viewport) and hasMore is true, calls onLoadMore.
Returns a ref to attach to the sentinel element.
Uses a ref for isLoading so the observer stays attached across loading
state changes, avoiding setup/teardown churn that causes scroll jank.
Attaches an IntersectionObserver to a sentinel element. When the sentinel enters the scroll container (or viewport) and
hasMoreis true, callsonLoadMore. Returns a ref to attach to the sentinel element.Uses a ref for
isLoadingso the observer stays attached across loading state changes, avoiding setup/teardown churn that causes scroll jank.