Trouble with multiple pinia actions inside useAsyncData
I want to fetch a bunch of paginated data on pageload, so I use
The problem is, when I generate an array of requests to pass into a Promise, the function stalls. It's not that the
What am I doing wrong?
useAsyncData to avoid dupe requests. I get that you're not really meant to use useAsyncData for side-effects but since it's the only mechanism I know of that prevents duplicate fetches, it's what I got.The problem is, when I generate an array of requests to pass into a Promise, the function stalls. It's not that the
reqs array is undefined - it's that nothing runs past it inside that function. asyncData simply returns null before ever reaching the Promise.What am I doing wrong?