T
TanStack2y ago
correct-apricot

What is the best way to paginate my queries (limit/offset on db) using tanstack table and query

I have a Node aplication on the back-end doing raw SQL and a React appliction on the front-end using tanstack table and tanstack query. if anyone has some tips or code that would help it would be apreciated
1 Reply
ambitious-aqua
ambitious-aqua2y ago
Have you already checked out the guide on paginated queries? https://tanstack.com/query/latest/docs/framework/react/guides/paginated-queries
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:

Did you find this page helpful?