Skip to main content
Two pagination styles in most apps:

Infinite scroll

For feeds — chat, social, activity. User scrolls; new items load. Best for chronological browsing.

Paginated table

For data tables — admin panels, reports. User clicks Next/Prev. Best for known size and exact navigation.

Convex pagination

Convex provides cursor-based pagination via paginate:
convex/tasks.ts
Returns:

Client — infinite scroll

For auto-loading on scroll, attach an Intersection Observer to a sentinel element and call loadMore when it enters the viewport.

Client — paginated table

Maintain page state in URL:
For more efficient page jumps (skip to page 5 without loading 1–4), use offset-based pagination — Convex doesn’t have native offset pagination; you can implement via _creationTime cursors plus client-side offset.

Tips

Pick a sane initialNumItems. 25 is a good default; smaller wastes round trips, larger wastes bandwidth.
For truly large data, prefer search over pagination. Users rarely scroll past page 3 — give them a search bar instead.

Convex queries

The query layer.

Search patterns

Search as an alternative to pagination.

Performance issues

Pagination as a fix.
Last modified on April 18, 2026