The pattern this site uses is short:
- Define
queryOptionsonce per resource. - In the route
loader, callqueryClient.ensureQueryData(options). - In the component, call
useSuspenseQuery(options).
Because the router's SSR-Query integration dehydrates the cache, the data the server fetched is already on the client when React hydrates — no second request, no loading flash.
Keep the router's own
defaultPreloadStaleTimeat0so Query, not the router, decides when data is stale.