This repo uses two composables to show that serverPrefetch does not work as written in the Vue documentation. The way to fix it is to use Pinia and a store to persist the data. Additionally, it addresses the issue of clearing the data and refetching it when the route changes.
-
Notifications
You must be signed in to change notification settings - Fork 0
Demonstrates the use of serverPrefetch, onMounted and router hooks to SSR data, hydrate it and update on route.
License
seriouslysean/vue-3-ssr-fetchdata
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Demonstrates the use of serverPrefetch, onMounted and router hooks to SSR data, hydrate it and update on route.