# TanStack Query

19 Hacker News commenters recommended TanStack Query and 2 criticized it, November 2025 to November 2026. It was recommended in 9 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** Recommended for handling cache invalidation and re-rendering in React data fetching. Critics say it is over-engineered for simple cases.

## Why people recommend it

- Solves cache invalidation and re-rendering (2 comments): "Data fetching libraries like Tanstack Query solve one of the hardest problems of cache invalidation/re-rendering." ([source](https://news.ycombinator.com/item?id=48278645)) "tanstack query already does all the hard part" ([source](https://news.ycombinator.com/item?id=47697266))
- Works well with TanStack Router (2 comments): "I've found Vite + React SPA ( Tanstack Router/Query) with a Nodejs/Fast API to work so simply" ([source](https://news.ycombinator.com/item?id=50030404)) "I went with a simple Hono + Tanstack Router/query." ([source](https://news.ycombinator.com/item?id=47503164))
- Adds caching React lacks natively (2 comments): "you will be left without a stable native caching mechanism in React unless you put the stream into state" ([source](https://news.ycombinator.com/item?id=47762350)) "works great with TanStack query for cache I validation" ([source](https://news.ycombinator.com/item?id=47687257))

## What people warn about

- Simple hooks can replace it (2 comments): "even tanstack useQuery() is way over-engineered and the core idea can be implemented in" ([source](https://news.ycombinator.com/item?id=46691268)) "It's not just react query, you can make a quick useFetch and useMutation hooks" ([source](https://news.ycombinator.com/item?id=47697719))

## Alternatives hackers recommend

- [Redux](https://hackerapproved.com/p/redux.md): 15 recommend
- [Zustand](https://hackerapproved.com/p/zustand.md): 12 recommend
- [XState](https://hackerapproved.com/p/xstate.md): 12 recommend
- [MobX](https://hackerapproved.com/p/mobx.md): 7 recommend
- [Pinia](https://hackerapproved.com/p/pinia.md): 6 recommend

## Cite as

Hacker Approved, "TanStack Query", https://hackerapproved.com/p/tanstack-query/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
