Do you have any advice or examples on how to handle filter-able paginated pages in a static Next js site? E.g. a list of all Blog posts in a site that can be filtered by multiple filter options.
For more context, I’m using Next js with the Pages router, but any examples would be great. I’ll also be using this in contexts where there may be up to 100s of articles, so ideally it would be somewhat performant with that number of items.
I’m struggling to come up with an effective way to sync up URL parameters, along with client side filters and paginated data.
My best bet might be to fetch the data on the client based on the applied filters and paginate accordingly, but I’m worried that this might list posts that haven’t been built yet and would also increase my number of API calls. I’ve considered other options like retrieving all of the data on build time and filtering it on the client, but this doesn’t seem like it would scale very well.
Please let me know if you have any solutions to this.