pagination - Offset Method

Hi trpc has pagination example but only using cursor Is there an example there that use offset pagination Or is it not supported by trpc useInfiniteQuery. Thank you
useInfiniteQuery | tRPC
- Your procedure needs to accept a cursor input of any type (string, number, etc) to expose this hook.
Pagination (Reference)
Prisma Client supports both offset pagination and cursor-based pagination. Learn more about the pros and cons of different pagination approaches and how to implement them.
Alex / KATT šŸ±
Alex / KATT šŸ±ā€¢389d ago
we wouldn't use useInfiniteQuery then i think
Alex / KATT šŸ±
Alex / KATT šŸ±ā€¢389d ago
Paginated / Lagged Queries | TanStack Query Docs
Rendering paginated data is a very common UI pattern and in TanStack Query, it "just works" by including the page information in the query key: