NuxtN
Nuxt13mo ago
grip

Set ref in useAsyncData

in nuxt2 with the @nuxtjs/composition-api plugin i was able to do this:

const foo = ref(null)

useFetch(() => {
   const data = await fetchData()

   foo.value = data
})


is there a way to set some refs inside setup when fetching in nuxt 3? or do i have to refactor all of my useFetch usages?
Was this page helpful?