Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 10
    I was hopeful this would work, but this moves back to the next Route above it - not to the route you were on before navigating to the page. Good to know this exists, but if you have multiple entry points for your component, this method will only ever go back to the route above it, not where you originated from. Commented Jan 9, 2018 at 22:44
  • As I write "when I need to move back as in file system" :) For me, this behavior was also unexpected. Commented Jan 23, 2018 at 13:39
  • 3
    You're confusing back (e.g. cd -) with up (cd ..). Nevertheless, it's handy to know this works. Commented Jan 26, 2021 at 14:41
  • This returns to the parent view (it does not always equate to the previous view) Commented Feb 1, 2022 at 13:35