Skip to content

useQueries manual aggregation #2004

Answered by TkDodo
damianfrizzi asked this question in Ideas
Discussion options

You must be logged in to vote

It depends on the use case. You might want to display a loading spinner while at least one query is loading, others might want to show data as soon as it’s available and only show a spinner while all queries are loading.

That’s why the api is un-opinionated. For your use-case you can easily make a custom hook with 5 lines of code that encapsulates the results.some(...) logic and use that over directly calling useQueries.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by damianfrizzi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants