Next/navigation get previous pathname. #61258
s1139341TimDeRuijter
started this conversation in
Ideas
Replies: 2 comments
-
+1 to this Did you find a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
-
+1 to this I’m having the same problem, tried some solutions but can’t find one that works. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
Does not include the prevention of going back. Which would be a good addition nonetheless.
Background
I've seen this issue: #36723 but those answers don't work because they don't assume a user can use the back and next buttons from the browser. And the user can also enter a route in the navigation bar that is not considered.
Proposal
Something like this: usePreviousPathname(); And then when there is no previous route to go back to or the previous route is not your application just set it be null.
Beta Was this translation helpful? Give feedback.
All reactions