Dynamic routes with params using data defetching fail on subsequent navigations #169
-
Using following page structure The whole issue is bit hard to explain, so here is a reproduction
Screen.Recording.2023-05-22.at.13.16.17.movOn my local setup if I on initial load/refresh everything is fine, only subsequent navigations result in failure. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You had a few issues:
A few extra notes: you don't need to export the loader from App. In fact, App.vue is the only component that cannot use a loader as it mounts before the navigation starts (unless you await for the first navigation before calling Here you have a working example: https://stackblitz.com/edit/vitejs-vite-pmdkkm?file=src%2FApp.vue,src%2Floader.ts,src%2Fpages%2Ftest%2F[slug]%2Findex.vue,src%2Fmain.ts (not sure how long it will stay up) |
Beta Was this translation helpful? Give feedback.
#173