useInfiniteScroll

Loads paginated data as the user nears the end of a list. An IntersectionObserver watches a sentinel after the last item and loads the next page while it is in view, re-checking after every page so a short page never stalls the list.

Install: pnpm add-composable useInfiniteScroll

Infinite list

Scroll the box. Reset while a page is loading: the late page is dropped, so the list starts again from page 1 with nothing repeated.

API