TanStack Query
Asynchronous server-state management library providing request deduplication, stale-while-revalidate caching, pagination, optimistic mutations, and SSR hydration.
ID: tech:tanstack-query | Kind: library | Latest: v5.62.2 | License: MIT | Verified: 2026-12-01
When to use
- Your frontend application fetches, caches, polls, paginates, or mutates remote REST/RPC/GraphQL data and needs automatic background refetching and deduplication.
- You want to separate remote server cache management from local UI state and eliminate manual useEffect loading/race-condition boilerplate.
When to avoid
- You need pure synchronous client-only UI state (theme toggles, modal open state, canvas coordinates) better handled by React state or Zustand.
- Your application relies exclusively on static build-time data or pure server-rendered forms with no client-side data revalidation.