Skip to content

SSR data is fetched again on the client with vike-vue-query #1792

Discussion options

You must be logged in to vote

@brillout I have found the root cause of the issue. Turns out, this is an expected behaviour in TanStack Query, where if you use SSR - you have to set the query's stale time to a high enough value to avoid immediate refetch.
It was actually answered here.
So there is no issue with vike or vike-vue-query whatsoever.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@BMFreed
Comment options

Comment options

You must be logged in to vote
2 replies
@brillout
Comment options

@BMFreed
Comment options

Answer selected by BMFreed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants