I'm migrating from @nuxtjs/composition-api
package to Nuxt Bridge and I see that useFetch
is available only with Nuxt 3.
Before, I was using the pattern below:
const { state: userState, getUserList } = useUserList()
const { state: groupState, getGroupList } = useGroupList()
// ...
const { fetchState } = useFetch(async () => {
await Promise.all([
getUserList(),
getGroupList(),
// ...
])
})
And I could use fetchState.pending
to display a loader until everything was loaded.
How to have the behavior with Nuxt Bridge knowing that only useLazyAsyncData
and useLazyFetch
are compatible?