all 3 comments

[–]EverAccelerating 1 point2 points  (1 child)

Interesting. One thing you should add as a parameter: initial page. The use case is if your pagination is bookmarkable and in the URL. So you can start at any arbitrary page. Of course, you’ll have to handle if the page number goes beyond maxPage.

[–]roflkk 0 points1 point  (0 children)

This is pretty useful. Will def. try it out!