Open frederikhors opened 3 years ago
Reading https://sveltequery.vercel.app/guides/background-fetching-indicators#displaying-global-background-fetching-loading-state:
If I use useIsFetching immediately inside <QueryClientProvider client={queryClient}> it throws:
useIsFetching
<QueryClientProvider client={queryClient}>
Error: No QueryClient set, use QueryClientProvider to set one
I need to use a sub-components for it to work.
Why?
Thanks! useIsFetching in this case is called outside the provider in your case. Try to use the IsFetching component...
Oh. Wow. You're right!
Is there any docs for IsFetching cmp?
IsFetching
Reading https://sveltequery.vercel.app/guides/background-fetching-indicators#displaying-global-background-fetching-loading-state:
If I use
useIsFetching
immediately inside<QueryClientProvider client={queryClient}>
it throws:Error: No QueryClient set, use QueryClientProvider to set one
I need to use a sub-components for it to work.
Why?