diff --git a/src/trpc/react.tsx b/src/trpc/react.tsx index a4c7697..cc5c41f 100644 --- a/src/trpc/react.tsx +++ b/src/trpc/react.tsx @@ -57,6 +57,12 @@ export function TRPCReactProvider(props: { children: React.ReactNode }) { headers.set('x-trpc-source', 'nextjs-react') return headers }, + fetch: (url, options) => { + return fetch(url, { + ...options, + keepalive: true, + }) + }, }), ], })