tRPCttRPC
Powered by
asliwinskiA
tRPC•3y ago
asliwinski

Implementation of bi-directional cursor-based pagination

I'm looking at the example for
useInfiniteQuery
useInfiniteQuery
and I'm trying to make it bi-directional. I know I need to pass
getPreviousPageParam
getPreviousPageParam
that returns the second cursor, but I don't see any obvious way to pass the direction information to the procedure. What would be the recommended way to do it?
useInfiniteQuery | tRPC
- Your procedure needs to accept a cursor input of any type (string, number, etc)
useInfiniteQuery | tRPC
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Bi directional infinite query example with prisma
taylor.prestoTtaylor.presto / ❓-help
4y ago
trpc Pagination
<DxD/><<DxD/> / ❓-help
3y ago
Pagination Query
NightNNight / ❓-help
3y ago