N
Nuxtβ€’9mo ago
Omnislash

useFetch vs $fetch

Hello, First of all, I understand that : - useFetch = useAsyncData + $fetch - $fetch is pre-hydration (if awaited, even resolved pre-hydration) That being said, with SSR fully disabled, is there any perk using useFetch instead of $fetch ? SSR is disabled for me because : - Nothing will be publicly accessible anyway, no SEO needed - For the type of project, it's more important to reduce the server workload and the client will be ok to "wait the extra time" Thanks πŸ™‚
2 Replies
Likonima
Likonimaβ€’9mo ago
Alexander Lichter
YouTube
You are using useFetch WRONG! (I hope you don't)
πŸ’ͺ🏻 useFetch is a mighty composable to fetch data in your Nuxt.js application. It can do so many things, from updating state to refreshing calls easily and even data caching is possible. But often I see that people misuse useFetch because it is so tempting to use all the features, even when you shouldn't. In this video I show the most common mist...
Omnislash
OmnislashOPβ€’9mo ago
Sorry I meant to GET data when loading a page πŸ™‚
Want results from more Discord servers?
Add your server