Can't detect previous route. Can't pass state on navigation with delta - navigate(-1) #10326
Unanswered
Kris-Pelteshki
asked this question in
Q&A
Replies: 0 comments
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.
-
All the suggestions I've seen across the internet point towards passing pieces of state on navigation and reading that state on the next page. This kind of works in some situations, but I've seen it cause confusion, so it's a bit weird that there isn't native support.
Secondly,
navigate(-1)
cannot accept an options argument, based on the Typescript definitions. So, you're forced to store external state just to keep track of what page you came from.I might be wrong, but isn't this a pretty basic case for a navigation library? Why can't we know where we navigated from?
Beta Was this translation helpful? Give feedback.
All reactions