I was working on a client's project and they wanted paginations all over the project, since the volume of data that we were working with was huge.
So I thought of creating Pagination in LWC and reuse it.
It turned out to be a great life saver also the rendering of data was super fast!
However, am not publishing this as a reusable component, though I created one.
I will leave it to you to implement. That way you learn a lot :p
Post your comments in case you are stuck somewhere and I will look into it.
Please check the code here!
Am starting off with the template file.
Then comes the JS file where we have all the logic in place.
And here is the CSS file. Used it to add little bit of custom styling.
And finally the apex class.
That is it all!
In case you implemented using some other logic, feel free to comment. Would love to check it out.