Examples · Data & cache

Infinite scroll

infiniteResource() accumulates pages; loadMore is deduplicated.

Cursor pagination without bookkeeping: infiniteResource() turns a cursor into a URL, keeps every page and exposes hasMore and loadMore(). A sentinel element observed with inView() triggers the next page.

Playground

What to notice

  • Pages are appended; list() keeps the already rendered rows.
  • Calling loadMore() twice while a page is in flight sends one request.
  • hasMore comes from the next cursor the server returns.

Scroll to the bottom of the result repeatedly until the list ends at 16 users.