Adi_
Adi_
NNuxt
Created by Yassaaa on 3/14/2024 in #❓・help
useFetch help - not working/fetching data
try parsing using this JSON.parse(JSON.stringify(response))
10 replies
NNuxt
Created by Yassaaa on 3/14/2024 in #❓・help
useFetch help - not working/fetching data
I am not sure what could be the extact reason for this 🤔. If you are saying $fetch works for you, use inside asyncData it would behave same as useFetch i.e. only render in the server side.
10 replies
NNuxt
Created by Yassaaa on 3/14/2024 in #❓・help
useFetch help - not working/fetching data
If the data returned is a string you can use JSON.parse(<string>) to make it an object
10 replies
NNuxt
Created by Yassaaa on 3/14/2024 in #❓・help
useFetch help - not working/fetching data
I like using useFetch becoz it only runs on the server side and the same data is carried forward to the client side. The simple fetch would call the api 2 times server & client.
10 replies
NNuxt
Created by Yassaaa on 3/14/2024 in #❓・help
useFetch help - not working/fetching data
Okay great 😃.
10 replies
NNuxt
Created by Yassaaa on 3/14/2024 in #❓・help
useFetch help - not working/fetching data
give it a read and see if it helps https://nuxt.com/docs/api/composables/use-fetch
10 replies