Ramazan
Ramazan13mo ago

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

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
GitHub
GitHub - relsunkaev/trpc-ssr-suspense-repro
Contribute to relsunkaev/trpc-ssr-suspense-repro development by creating an account on GitHub.
Solution:
Answered in the issue - not a bug. Use Suspense.CSROnly from @suspensive/react
Jump to solution
1 Reply
Solution
Ramazan
Ramazan13mo ago
Answered in the issue - not a bug. Use Suspense.CSROnly from @suspensive/react