TanStack Query

getNextPageParam

Computes the next page parameter; null or undefined denotes no next page.

Formal Syntax & Structure

react syntaxreact
getNextPageParam: last => last.next ?? undefined

Working Example

Example Snippetreact
getNextPageParam: last => last.next ?? undefined
React Reference