T
tRPC

`useSuspenseQuery` still runs a fetch on SSR even when setting `ssr: false` in the api config

`useSuspenseQuery` still runs a fetch on SSR even when setting `ssr: false` in the api config

RRamazan11/20/2023
Beside double-fetching, this causes issues during rendering if you have auth on your routes as the SSR server doesn't seem to pass through the cookies to the tRPC route. Using Next.js 14.0.3 with the pages directory. Repro here: https://github.com/relsunkaev/trpc-ssr-suspense-repro
Solution:
Answered in the issue - not a bug. Use Suspense.CSROnly from @suspensive/react
Jump to solution
Solution
RRamazan11/21/2023
Answered in the issue - not a bug. Use Suspense.CSROnly from @suspensive/react

Looking for more? Join the community!

T
tRPC

`useSuspenseQuery` still runs a fetch on SSR even when setting `ssr: false` in the api config

Join Server