Typing weirdness multiple AsyncData in array
Hi All, i can't seem to figure out why storing multiple asyncData objects in an array seems to unref the data, status etc properties. I have an example on this stackblitz: https://stackblitz.com/edit/nuxt-starter-qezsnt?file=useMyAsyncData.ts
Might be something very stupid, but it has been keeping me busy for a while now.
1 Reply
Got it working by using wrapperArray as a reactive instead of a ref. Still not sure why.
So it is because of ref unwrapping and works for reactive arrays because it doesn't unwrap arrays.
https://vuejs.org/guide/essentials/reactivity-fundamentals.html#additional-ref-unwrapping-details