Blog

TanStack Query: CORS, credentials, and refetch policies for cross-origin dashboards

Configure queryClient defaults so fetch retries do not amplify preflight storms during outages.

1 min read
reacttanstackcors

Error boundaries

Surface CORS failures as actionable UI states instead of generic network errors.

Log TanStack Query meta with correlation IDs to match server traces.

Next.js App Router

Server components can prefetch without CORS; hydrate carefully to client queries that do.

Align revalidate tags with API cache invalidation when using edge caches.

Back to blog