asliwinski
asliwinski17mo ago

Implementation of bi-directional cursor-based pagination

I'm looking at the example for useInfiniteQuery and I'm trying to make it bi-directional. I know I need to pass 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)
0 Replies
No replies yetBe the first to reply to this messageJoin