RJ
RJ3mo ago

`useNextPrevPaginatedQuery`

Hey all—I published to npm a little React hook for performing a more traditional form of pagination than what Convex offers by default via usePaginatedQuery. This hook, called useNextPrevPaginatedQuery, only loads one page of results at a time, and exposes functions for loading next/prev pages in the paginated result set. Check it out on GitHub or npm.
3 Replies
Indy
Indy3mo ago
Put this in #show-and-tell . I'm discussing with the team where we can list it so it can be found more readily.
Starlord
Starlord3mo ago
thank you. does it work with optimisticallyUpdateValueInPaginatedQuery? and with "skip" i tested it seems to work. also it doesnt do 2 requests on exhausted like https://discord.com/channels/1019350475847499849/1318966493001810162 there is a bug as far i can see. if first request is "skip". than when state changes it will not work
RJ
RJOP3mo ago
Thanks for trying it out @Starlord! I’ll look into the skip issue today It is meant to work with ”skip” also https://discord.com/channels/1019350475847499849/1319668553171075184 Just shipped a patch in which this should be fixed

Did you find this page helpful?