mobx vs @tanstack/react-query
@tanstack/react-query is downloaded 13.9× more often than mobx (225,327,948 vs 16,212,601 per month), so it has the larger community and more answered questions online. @tanstack/react-query ships 25% less gzipped JavaScript (13.3 kB vs 17.7 kB), which matters if bundle size is a priority. Both projects are actively maintained.
| Metric | mobx | @tanstack/react-query |
|---|---|---|
| Weekly downloads | 3,789,180 | 51,850,189✓ |
| Monthly downloads | 16,212,601 | 225,327,948✓ |
| GitHub stars | 28,194 | 49,542✓ |
| Minified size | 62.2 kB | 45.1 kB✓ |
| Minified + gzipped | 17.7 kB | 13.3 kB✓ |
| Dependencies | 0✓ | 1 |
| Open issues | 73✓ | 172 |
| Last commit | 2026-05-31 | 2026-06-02✓ |
| Latest version | 6.15.4 | 5.100.14 |
| License | MIT | MIT |
When to choose which
mobx
Transparent reactive state via observables.
Choose it when: You prefer an OOP/reactive model where state updates track automatically, with minimal explicit wiring.
- + Automatic dependency tracking
- + Less explicit boilerplate
- - Magic can be hard to debug
- - Decorator/class style divides opinion
@tanstack/react-query
Async server-state: caching, refetching and mutations.
Choose it when: Managing data from an API — caching, background refetch, pagination, mutations. It complements (not replaces) a client store.
- + Best-in-class server cache
- + Great devtools
- + Handles refetch/stale data
- - Not for client/UI state
- - More config than SWR
Feature comparison
| Feature | mobx | @tanstack/react-query |
|---|---|---|
| Paradigm | Observables | Async server cache |
| First-class TypeScript | ✓ Yes | ✓ Yes |
| Works outside React | ✓ Yes | Partial |
| Dedicated devtools | ✓ Yes | ✓ Yes |
| Built-in async / server state | Manual | ✓ Yes |
| Boilerplate | Low | Low |
Related comparisons
Embed this comparison
A live badge for your README — it updates as the numbers change.
[](https://devcompare.dev/compare/mobx-vs-tanstack-react-query)Data from npm, Bundlephobia and GitHub. Last updated 2026-06-02.