refetching from child component with typescript?
What is the best way to refetch a query from a child component when using typescript?
Do you pass refetch from the parent, then set up the interface props like this? Or is there a fundmental react-query method that I'm missing?
2 Replies
sensitive-blue•2y ago
QueryClient | TanStack Query Docs
QueryClient
The QueryClient can be used to interact with a cache:
extended-salmonOP•2y ago
So the fetch query is like use query except if it already exists there’s no additional trip to the server ?