Multiple queries in v5 - smth like Promise.all([])
Hi guys, i have unfinished snippet of code here which obvs does not work:
What i need is to execute all queries in one go before i pass them as a prop. So i need some mechanism what is used in JS - Promise.all . How can i finish this:
4 Replies
unwilling-turquoise•15mo ago
If these are all truly connected, you could make the queryFn the place where
promise.All() happens:
xenogeneic-maroon•15mo ago
doesnt
useQueries accomplish this?exotic-emeraldOP•15mo ago
Exectly... I mean the question is can I use and if yes how can i use to avoid useing Promise.all to accomplish a similar effect
xenogeneic-maroon•15mo ago
The docs have some pretty great examples on how it works!