GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Blog
  • YouTubeThe official TanStack channel.
  • WorkshopsLive sessions from the maintainers.
  • DiscordReal-time community support.
  • GitHubSource, issues, discussions, and releases.
  • ShowcaseProjects selected by the TanStack team.
  • Community projects
  • TanChatNEW
  • StatsNPM and ecosystem usage data.
  • Merch
  • Support OverviewFind the right support path.
  • PartnersCompanies supporting TanStack.
  • EthosHow we approach open source.
  • TenetsThe values that shape TanStack libraries.

This view

  • Original page
  • New address

GeezerVison is showing tanstack.com — TanStack Query

TanStack

Query

The server-state standard for modern frontend apps.

Query gives async data a cache, a lifecycle, and declarative APIs for fetching, sharing, refetching, mutating, and observing server state.

Docs
query client
stale0/3 fresh

useQuery()

['issues', 'router-cache']

Components declare the data they need. The cache coordinates fetches, subscribers, freshness, retries, and background updates.

status
success
fetchStatus
fetching
isStale
true
observers
0
staleTime
4,000
updated
primed
mutation
idle
3.5Btotal downloads94,039,764weekly downloads50,572GitHub stars

Server and client state are not the same

Deadly defaults kill boring work.

Caching, request deduplication, retries, background refetching, window-focus updates, and garbage collection arrive wired for real applications.

Cache lifecycle

Keep data useful while the network catches up.

Stale data can remain valuable. Render from cache immediately, refresh quietly, and clean up only after the last observer leaves.

1

Fetch

A query function resolves data while Query owns cancellation, retries, and deduplication.

2

Share

Every observer reads the same cache entry instead of issuing another request.

3

Revalidate

Stale data stays visible while a background request refreshes it.

4

Collect

Unused data remains available briefly, then garbage collection removes it.

Mutations

Writes update the world, then the cache.

Optimistic UI, pending state, recovery, invalidation, and reconciliation stay explicit instead of scattering through components.

optimistic write

setQueryData(['todos'], next)

server mutation

await saveTodo(todo)

targeted refresh

invalidateQueries({ queryKey: ['todos'] })

rollback path

onError: restoreSnapshot

Partners

Gold
LovableLovable
CodeRabbitCodeRabbit
CloudflareCloudflare
RenderRender
RailwayRailway
Silver
WorkOS
OpenRouterOpenRouter
SerpApiSerpApi
ClerkClerk
Bronze
PrismaPrisma
Scarf
OSS Sponsors

Sponsors get special perks like private discord channels, priority issue requests, and direct support!

Become a Sponsor
View Previous Partners
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.