Skip to content
Discussion options

You must be logged in to vote

useFetch in Nuxt is a wrapper around $fetch that handles SSR automatically.
useQuery does the same thing for SSR when plugin is properly set up.
There are additional benefits of using vue-query when app runs in client side mode.
But useQuery in itself does not fetch the data so it needs $fetch or other Promise based function as queryFn.

But you should not mix both. Choose one of them.

Replies: 1 comment 1 reply

Comment options

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

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