TanStackT
TanStack2y ago
2 replies
dry-scarlet

is useQuery better than useInfiniteQuery for Infinite scroll table serverside search,filter etc.?

I see useInfiniteQuery basically just keeps the previous data and you request next page, but when you do serverside search-sort-filtering, you of course do the last page search-sort-filtering, because you only know the lastPage, isn't useQuery basically better in this case with some adjustments on serverside? at least it doesn't duplicate items that way. or what i'm a missing?
Was this page helpful?