Skip to content
Source
Sign inSign up
TanStack/query

Architecture

Describes commit 8363fa3Updated Made by anthropic/claude-haiku-5.5

Diagrams

  1. How do the packages depend on each other?

    • React adapter to Query core engine: query observers
    • Preact adapter to Query core engine: query observers
    • Angular adapter to Query core engine: query observers
    • Lit adapter to Query core engine: query observers
    • Persist core to Query core engine: cache state
    • Async storage persister to Persist core: persisted client
    • Devtools UI to Query core engine: cache state
    • package
    • Framework adapters depend on query-core.
    • Persisters depend on query-core and the persist core.
    • Devtools depend on the shared devtools UI.
  2. How does a query reach the UI?

    • Framework hook to Query observer: subscribe
    • Query observer to Query cache: read and write query state
    • Query cache to Data fetch function: fetch call
    • Data fetch function to Query cache: resolved data
    • Query cache to Query observer: notify change
    • package
    • store
    • external
    • A hook creates a query observer in query-core.
    • The observer fetches data through the query cache.
    • The adapter re-renders when the observer notifies it.