Skip to content

[Bug report] Route path is not correct when navigating #1249

Closed
@Mister-Hope

Description

@Mister-Hope

Description

When accessing route.path at onMounted lifecycle, the value is the previous page, and this is not an expected behavior:

  • watcher for route will be triggered unexpected
  • a component will initialized with a route path it doesnot belong to

A normal vue app is working as expected: https://stackblitz.com/edit/vitejs-vite-ssyfup?file=src%2Fcomponents%2FB.vue,src%2Fcomponents%2FC.vue,src%2Fcomponents%2FHome.vue&terminal=dev

Reproduction

https://stackblitz.com/edit/vuepress-ewt9uy?file=docs%2Fguide%2FREADME.md

Used Package Manager

npm

System Info

Not needed

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions