MCPcopy Create free account
hub / github.com/TanStack/query / hasNextPage

Function hasNextPage

packages/query-core/src/infiniteQueryBehavior.ts:190–196  ·  view source on GitHub ↗
(
  options: InfiniteQueryPageParamsOptions<any, any>,
  data?: InfiniteData<unknown>,
)

Source from the content-addressed store, hash-verified

188 * @returns `true` if `getNextPageParam` returns a value other than `null` or `undefined`.
189 */
190export function hasNextPage(
191 options: InfiniteQueryPageParamsOptions<any, any>,
192 data?: InfiniteData<unknown>,
193): boolean {
194 if (!data) return false
195 return getNextPageParam(options, data) != null
196}
197
198/**
199 * Checks if there is a previous page.

Callers 1

createResultMethod · 0.90

Calls 1

getNextPageParamFunction · 0.70

Tested by

no test coverage detected