double request after use $fetch
I have written a wrapper for get data from the api, the problem occurs on the SSR side because when entering the website for the first time, queries that should be sent via SSR are also sent via the client. The differences can be seen when I add new Date() in console.log. anyone had such a problem?
its wrapper:
times:
5 Replies
ping
to extract the payload you'll either need to use nuxt generate or enable it. Additionally you should use
useAsyncData
or the useFetch
composables as they'll handle the payload extraction (unlike $fetch)i tried use useFetch and results its same, have two request, maybe useFatch has flag to use only on server/client?
But is payload extraction on? It needs the data to hydrate
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View