Start with the right question. Land on the right page.
One search covers the learning path and agent references. Titles, body copy, task keys, packages, and version metadata all participate.
15entries indexed
- 01
Build a bounded cursor Infinite Query
Use one queryKey for the full list, let server cursors drive pageParam, and bound cache and refetch cost with maxPages.
- 02
Configure Query SSR and streaming hydration
Create a QueryClient per SSR request, use the Router integration for dehydration and hydration, and classify blocking versus streaming queries.
- 03
Consume Query AbortSignal
Pass the queryFn signal into the request layer so cancellation stops I/O with explicit cache-revert semantics.
- 04
Define a Query freshness contract
Set staleTime from data volatility and decide inactive-cache gcTime independently.
- 05
Define when data is fresh
Separate staleTime from gcTime and co-locate keys, fetchers, and time policy in shared queryOptions.
- 06
Implement a rollback-safe optimistic update
Cancel conflicting refetches, snapshot cache, write an immutable draft, roll back on failure, and revalidate on settlement.
- 07
Isolate and stream Query state across SSR
Use the Router SSR Query integration for dehydration, hydration, and streaming while creating an isolated cache per server request.
- 08
Keep infinite lists bounded and recoverable
Define pagination with initialPageParam, cursors, and maxPages while preserving the pages and pageParams structure.
- 09
Let the loader warm the Query cache
Router decides when navigation happens while Query owns the cache. Connect them with one shared queryOptions object.
- 10
Make optimistic updates safe to roll back
Choose UI-only pending output or a cache-level update, then handle failure and concurrency with cancellation, snapshots, rollback, and revalidation.
- 11
Prefetch Query from a route loader
Create a request-scoped QueryClient for SSR and reuse one queryOptions contract in the loader and useSuspenseQuery.
- 12
Propagate Query cancellation to the network
Consume the AbortSignal supplied to queryFn so obsolete fetches stop and cancellation state remains predictable.
- 13
Router loader or Query?
Choose Loader, Query, or both from navigation criticality and data lifecycle needs.
- 14
Update cache from a mutation response
Use setQueryData when the write response contains the complete entity; invalidate when the correct cache cannot be derived.
- 15
Write back from a Server Function
Validate input at the network boundary, model write state with a mutation, then immutably update Query cache from the server response.