Next.js keeps moving server-first, and that is good. Server Components, route handlers, and cached fetches cover a huge amount of read-path work. So why do I still reach for TanStack Query on serious products?

Because not every async problem is a page load. Dashboards refetch. Filters change. Mutations need optimistic updates. Multiple widgets share the same resource. Users leave a tab open for hours. Server rendering solves the first paint. TanStack Query owns the living client.

What Next already does well

  • Initial data for SEO-critical and static-ish views
  • Streaming HTML while the server gathers content
  • Keeping secrets and privileged aggregation on the server

Where Query still wins

  • Client transitions that should not remount the whole route
  • Shared cache keys across distant components
  • Mutation lifecycles: pending, error, retry, invalidate
  • Refetch on focus, reconnect, and interval without reinventing listeners
  • Deduping identical in-flight requests from chatty UI

A pattern that plays nicely with App Router

hydrate + keep interacting
// Server: fetch initial workspace
// Client: useQuery({
//   queryKey: ['workspace', id],
//   queryFn: fetchWorkspace,
//   initialData: serverSnapshot,
// })

That `initialData` bridge is the quiet superpower. Users get a fast first paint from the server, then mutations and background sync stay coherent without forcing every interaction through a full navigation.

If your Next app is mostly brochure content, you may not need Query. If it is an operator panel, marketplace console, or trading surface, removing it usually means rebuilding half of it by hand.