Route isn't the same on refresh #2383
-
Reproductionhttps://stackblitz.com/edit/vue3-vite-router-starter-dnet26?file=src%2FApp.vue,src%2Frouter.js Steps to reproduce the bugWhen app is running no issue when navigating between tabs. Expected behaviorRoute be consistant on first load Actual behaviorRoute changed after a few ms Additional informationI tryed to reproduce as little as possibile. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is because thi initial navigation is async: https://router.vuejs.org/guide/migration/#All-navigations-are-now-always-asynchronous |
Beta Was this translation helpful? Give feedback.
This is because thi initial navigation is async: https://router.vuejs.org/guide/migration/#All-navigations-are-now-always-asynchronous
What you see is the
START_LOCATION
variable. You can change this behavior by doingawait router.isReady()
beforeapp.mount()