custom queryClient and prefetchQuery()
I create a custom queryClient and pass it to refine. and then I use queryClient.prefetchQuery() to fetch data but it is not show in devtools and the prefetch also seems does not work. what would be the cause?
6 Replies
Hi @joegor. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the Refine documentation (https://refine.dev/docs/api-reference/core/components/refine-config) for more information on how to configure the React Query client with Refine.
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------| refine
`` component is the entry point of a refine app. It is where the highest level of configuration of the app occurs.
<@666988497940250624> kapa.ai is still learning and improving, please let us how it did by reacting below
optimistic-gold•2y ago
another problem is when I use useQuery(). it keeps throw "No QueryClient set, use QueryClientProvider to set one"
optimistic-gold•2y ago
my config is
![No description](https://cdn.answeroverflow.com/1091571356874838016/image.png)
optimistic-gold•2y ago
the useQuery() is used inside Component
<Refine>
<Component/>
</Refine>