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:Jump to 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 trpc2 Replies
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 trpcYeah. Exactly what I found just after posting the question 🤦♂️ nonetheless thanks for answering as its what I was asking for ! Thank you ❤️