UsePaginatedQueryReturn
Defined in: packages/react/src/hooks/usePaginatedQuery.ts:51
Return type of usePaginatedCollection hook.
Mimics Convex’s usePaginatedQuery API for consistency.
Type Parameters
Section titled “Type Parameters”TDocument
Section titled “TDocument”TDocument extends VexDocument = VexDocument
Properties
Section titled “Properties”isDone
Section titled “isDone”isDone:
boolean
Defined in: packages/react/src/hooks/usePaginatedQuery.ts:71
Whether all documents have been loaded.
When true, Load More button should be hidden.
isPending
Section titled “isPending”isPending:
boolean
Defined in: packages/react/src/hooks/usePaginatedQuery.ts:82
Whether a query is currently in flight. Use for loading states on Load More button.
loadMore
Section titled “loadMore”loadMore: () =>
void
Defined in: packages/react/src/hooks/usePaginatedQuery.ts:76
Load more documents. Fetches the next page using initialNumItems.
Returns
Section titled “Returns”void
results
Section titled “results”results:
TDocument[]
Defined in: packages/react/src/hooks/usePaginatedQuery.ts:56
All loaded documents (accumulated across Load More calls). Starts with first page, grows as user clicks Load More.
totalDocs
Section titled “totalDocs”totalDocs:
number|null|undefined
Defined in: packages/react/src/hooks/usePaginatedQuery.ts:65
Total document count across all pages.
numberwhen count succeedednullwhen collection has >32k documents (Convex limit)undefinedwhen count hasn’t loaded yet orincludeTotalCount=false