Hacker News new | ask | show | jobs
by travellingprog 746 days 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/overv...
3 comments

Except 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.
We use https://tanstack.com/query/v3 + openapi-based auto-generated SDK.

I would say the DX is pretty much comparable to using Apollo Client.

What do you use to generate your SDK?
TanStack 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.

yeah, you're right!