More Examples
Framework Examples
Typed Axios without TanStack Query — Node, React, Svelte, Vue, and Angular recipes.
TanStack Query is one great home for a typed client. It is not the only one.
Same spine everywhere:
api.contracts.ts → api.op.* → Result { data, error } → your framework's statePick your runtime. Steal the snippet. Don't invent a second API layer.
Vanilla / Node
Scripts, CLIs, workers — no UI framework required.
React (no TanStack)
useEffect + useState. Still typed. Still Result-based.
Svelte
Load functions and reactive state with api.op.
Vue
Composables wrapping contracts and Result.
Angular
Injectable services + signals (or Observables).
TanStack Query
The full production React stack with query keys and loaders.
For architecture that sits above any framework, see The Query Layer.