API Reference
ConvexPaginatedQuery
Reference for the Nuxt renderless component that wraps useConvexPaginatedQuery.
ConvexPaginatedQuery is the Nuxt renderless component for paginated query feeds.
Example
app/pages/tasks.vue
<script setup lang="ts">
import { api } from '#convex/api'
</script>
<template>
<ConvexPaginatedQuery
:query="api.tasks.paginated"
:args="{ userId: 'user_123' }"
:options="{ numItems: 20 }"
>
<template #loading>
Loading...
</template>
<template #error="{ error, reset }">
<button @click="reset">
Retry
</button>
{{ error.message }}
</template>
<template #default="{ data, loadMore, isDone, isLoadingMore }">
<ul>
<li v-for="task in data" :key="task._id">
{{ task.title }}
</li>
</ul>
<button :disabled="isDone || isLoadingMore" @click="loadMore">
Load more
</button>
</template>
</ConvexPaginatedQuery>
</template>
Props
| Prop | Type | Meaning |
|---|---|---|
query | FunctionReference<'query'> | Paginated query reference |
args | FunctionArgs<Query> | Query args without paginationOpts in practice |
options | UseConvexPaginatedQueryOptions | Pagination options, default { numItems: 10 } |
suspense | boolean | Awaits the first page before render when true |
Slots
loadingerroremptydefault
Behavior
- Uses
useConvexPaginatedQueryinternally - Client-only data flow;
suspenseonly affects the component setup wait - Treats an empty flattened data array as the empty state