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
Was this page helpful?