React · Junior · Question 47 of 75
What problem does TanStack Query primarily solve?
- ✓Correct answer: Server state: fetching, caching, background data updates
- 2Routing between pages with data preloading
- 3Global UI state: whether a modal is open, the current theme
Explanation
Server data lives on the backend and can become stale. TanStack Query handles caching, retries, deduplication, refetching on window focus, pagination and mutations. Client UI state stays in useState, Context or Zustand/Redux.