DEV Community

Discussion on: Pagination in an API: page number vs start index

Collapse
 
mehdibenhemdene profile image
mehdibenhemdene

Well in this case I'd have to say that I really prefer the first method (page number and page size) because it's kind of similar to what the user is seeing and requesting (making it easier to render in client side instead of having to calculate the startIndex each time in case we want to display the page number in the UI for eg.).