Using urql together with TanStack Query / React Query #3771
-
I'm wondering if it's a bad idea to use urql together with TanStack Query, instead of with urql's own React bindings. This is attractive because TS Query can be used for other async requests such as REST APIs, device geolocation API, etc. On the other hand, I would hate to have to include urql's React bindings in addition to TS Query in the bundle if that cannot be avoided. A further point of complication is that in my particular case, I am using Next.js. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
@urql/core
with just afetch
exchange is probably a great idea to use with TanStack query as the bundle size is really low. You'll have to decide whether to useurql
or a normalfetch
depending on the request but apart from that it sounds like it should work.