Reputation: 81
I was just reading about API pagination and it seems like a good usecase, when the response needs to be sorted in some order and we need to provide the response on chunks.
But even if the response is provided in chunks, it does so by making multiple API calls.
Considering, if I'm providing 100 paginated records each, I'll still be getting multiple backend API calls and there is going to be traffic and DB resources being used.
So when is the most ideal use-case where pagination should be used?
Upvotes: 0
Views: 2001
Reputation: 99687
If you know for a fact that the client is going to want every item in a list, then in many cases it's better to let the client just get the entire list, but there's a few reasons why paging is useful:
That's just some stuff I can come up with.
We typically start paging when things have over a 100 items, or less if the items are large
Upvotes: 1