How to reserve/save the last visited page in react-table v6?

496 Views Asked by At

Hope everyone doing well! Is there any way to send the user back to the last visited page in react-table v6, to elaborate more, the main table has a button in each row that sends the user to another page, but I want the user when he/she returns back to the main page to get the last visited page!

edited: I am using a class-based component in the whole project.

thanks in advance.

1

There are 1 best solutions below

1
On

you can use useHistory() hook of React Router.
For more info, visit here: https://reactrouter.com/web/api/Hooks