Implement a server-side pagination using React Query

InstructorTomasz Ducin

Share this video with your friends

Send Tweet

To implement pagination you'll need to extend your search params type.

You'll also want to set a default value for the page either on the http function level, or the query function level depending on the design of your application.

You'll see how nice React Query's caching is when you quickly click back and forth through the pages and see the results immediately, since we set the garbage collection to take a few seconds in a previous lesson!