Data Fetching
Async/cache layers for client-side data.
React
- ★ TanStack Query (React Query) — the default. Caching, refetching, mutations, optimistic updates, infinite queries, devtools. Works great alongside Server Components for client-heavy screens.
- SWR — simpler API from Vercel. Fine choice for small apps.
- Apollo Client — the GraphQL workhorse. Mature, large feature surface.
- urql — lighter GraphQL client; good fit for smaller apps.
- Relay — Meta's GraphQL client; powerful, with a notable learning curve.
- RTK Query — bundled with Redux Toolkit; reasonable if you're already using Redux.
Across frameworks
- TanStack Query also has Vue, Solid, Svelte, and Angular ports — same caching model everywhere.
Server-side / RSC alternatives
- React Server Components + the framework's
fetch/cache (Next.js App Router). - Remix/React Router 7 loaders.
- TanStack Start loaders.
These cover most read paths for SSR-heavy apps; you usually still want TanStack Query for the client-driven pieces (mutations, polling, optimistic UI).
Pick this if…
- Default new project: TanStack Query.
- GraphQL backend: Apollo (large), urql (small), or Relay (Meta-style).
- You prefer simplicity over features: SWR.