Previuos route
Answered
Asiatic Lion posted this in #help-forum
Asiatic LionOP
I am trying to get the previouse route name.
I have a page (/catalog) that can go to another page (/item)
In the page (/catalog), how do I keep track that I was redirected from (/item) ?
route.back would just go back, but I want to keep track of the previous path
I have a page (/catalog) that can go to another page (/item)
In the page (/catalog), how do I keep track that I was redirected from (/item) ?
route.back would just go back, but I want to keep track of the previous path
Answered by ᴉuɐpɹɐɐ
You can store the previous link in a localStorage before redirecting to another page. This is done by creating a custom <Link> wrapper