I save the DataTable state in the local storage to avoid passing the page number all over my app. This is how I do it:
This is very useful when you go to another page and you want to go back (using the back button) to the last selected page.
reference