-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Description
just taking an Array of useQuery objects doesn't cover all the cases, because some options have to be the same for all queries, for example suspense
or useErrorBoundary
: We can't really have one query in the list suspend and some other query not suspend. Conceptually, useQueries
is also more than a bunch of useQuery
calls chained together.
Proposed solution
make useQueries
take an object as input, where we can define top level options that are true for all queries and a list of queries
, something like:
useQueries({
queries: [{ queryKey1, queryFn1, options1 }, { queryKey2, queryFn2, options2 }],
suspense: boolean,
useErrorBoundary: boolean
})
jgeurts and PhilVR-IJS