Skip to content
Discussion options

You must be logged in to vote

I don't think there is a general solution, as it highly depends on the use case. With concurrently running queries, it is sometimes correct to wait for all of the queries to succeed before showing data (like in your example), but sometimes, it is also correct to show any data as soon as you have it, and only show the big loading spinner while all queries are loading. This is conceptually the same when using useQueries or separate useQuery calls.

combining the requests in one fetching function with Promise.all can also work but of course has other drawbacks, like coupling them together into one query.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cmacdonnacha
Comment options

Answer selected by cmacdonnacha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants