3 ms·
TanStack Query (fka React Query) is a REST client similar to Apollo Client, with many of the same pros and cons: https://tanstack.com/query/latest/docs/framewor
by travellingprog 2y ago
TanStack Query (fka React Query) is a REST client similar to Apollo Client, with many of the same pros and cons:
https://tanstack.com/query/latest/docs/framework/react/overview https://tanstack.com/query/latest/docs/framework/react/overv...
- romanhotsiy 2y agoWe use https://tanstack.com/query/v3 https://tanstack.com/query/v3 + openapi-based auto-generated SDK. I would say the DX is pretty much comparable to using Apollo Client.
- shepherdjerred 2y agoWhat do you use to generate your SDK?
- WiseWeasel 2y agoExcept it only has a query-based cache, rather than a normalized cache by type name and ID. This means a deeply nested component running a mutation to update an entity can’t update the state of a component a few levels up purely with the response to that mutation, it instead needs to invalidate the cache and cause the parent to requery, much less performant.
- shepherdjerred 2y agoTanStack Query isn't a REST client. It's a generic data fetching framework. You could use TanStack query with GraphQL, Apollo, REST, or any other data source.
- travellingprog 2y agoyeah, you're right!