Use ReactQuery to fetch different api resource than trpc resource

I have an api endpoint which I can call using fetch. How one would re-use reactquery and call that endpoint directly. Do I need separate reactquery client?
Solution:
You should already have @tanstack/react-query installed as a dependency, you can just import useQuery from it, it will use the same query client as trpc
Jump to solution
2 Replies
Solution
Matvey
Matvey3mo ago
You should already have @tanstack/react-query installed as a dependency, you can just import useQuery from it, it will use the same query client as trpc
Mugetsu
MugetsuOP3mo ago
Yeah. Exactly what I found just after posting the question 🤦‍♂️ nonetheless thanks for answering as its what I was asking for ! Thank you ❤️
Want results from more Discord servers?
Add your server