Nextjs detect previous route
Is there a way to detect if the user is going back to a previous page? Right now I am doing this which does not work always, seems like it does not work for nested routes not sure if there is a good solution
4 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Using nextjs 12
GitHub
GitHub - STNeto1/next-history: next-history
next-history. Contribute to STNeto1/next-history development by creating an account on GitHub.
small demo with a poc
you can interact with local storage to record between session