-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
Discussed in #2355
Originally posted by luizeboli June 8, 2021
Hello guys, I have this hook:
export const useOptions = () => {
return useQueries([
{
queryKey: 'groups',
queryFn: () => axios({ method: 'GET', url: '/groups' }),
useErrorBoundary: true,
},
{
queryKey: 'types',
queryFn: () => axios({ method: 'GET', url: '/types' }),
useErrorBoundary: true,
},
{
queryKey: 'sourcedTypes',
queryFn: () => axios({ method: 'GET', url: '/sourcedTypes' }),
useErrorBoundary: true,
},
])
}
The component that consumes this hook is wrapped by a ErrorBoundary, but it doesn't throw while using useQueries. It just works with useQuery.
The only change needed to work correctly is replace useQueries by useQuery.
Is this an expected behavior? I didn't find it in docs
Metadata
Metadata
Assignees
Labels
No labels