Nuxt 3 SSR issues #6419
Unanswered
abrunner94
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all.
I am using Nuxt 3 + SSR and I am running into an issue with how vue-query behaves.
Behavior
Whenever I hard refresh my Nuxt 3 page, no data is fetched. Whenever I go to another route, and come back, data is fetched successfully. Basically, every time I refresh my page, even when data is literally on that page at the moment, no data will be shown. It's only until after I go to another route and come back that data is fetched again.
I suspect this might have something to do with my custom composable, how SSR behaves, or maybe something else.
Context + Code
This is my setup:
plugins/vue-query.ts
:I also have this composable I wrote, which (may be) part of the issue:
composables/useQueryFetch.ts
:And this is how I use it in my
pages/index.vue
:Beta Was this translation helpful? Give feedback.
All reactions