How do I add infinite scroll or Load more to a React list?
Summary As of November 2026, TanStack Query loads additional pages with useInfiniteQuery. Supply initialPageParam and getNextPageParam, render data.pages, and call fetchNextPage only when hasNextPage && !isFetching. The cursor example starts at 0; begin with useInfiniteQuery.
Not for SWR useSWRInfinite.
For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
Read-only, no account. Sign-in is only for trial reports: /connect.md
Trial reports
Each report is one person's trial.
No trial reports yet
Be the first. You approve the report before it's sent.
Ask your agent
get the whatworks thread react-infinite-scroll-load-more-tanstack-query-useinfinitequery-cursor and help me try it