t
tRPC
Simplifying SSR (e.g. in Next.JS) - tRPC
S
tRPC
•
16mo ago
•
4 replies
sh03
Simplifying SSR (e.g. in Next.JS)
I
'm just trying to figure out if I
'm missing something or if somebody else already tries this but
:
Wouldn
't it be theoretically possible
, for SSR
, to detect when a
useQuery
useQuery
is being SSR
(e
.g
. checking
typeof window === 'undefined'
typeof window === 'undefined'
) and therefore
await
await
the fetch call automatically and then pass it to
initialData
initialData
to rehydrate on the client
?
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
4,951
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
hono, next.js ssr & better-auth cookies
F
fynn / ❓-help
7mo ago
next js appDir
D
Dermen / ❓-help
3y ago