nehalistN
tRPC4y ago
15 replies
nehalist

tRPC without SSR

When using tRPC with ssr it uses
getInitialProps
, which has kinda of a cool effect in terms how a page is rendered, since it's rendered server-side on initial requests and client-side on route transitions.
Unfortunately, enabling ssr means that you can no longer use
getServerSideProps
(which I know is only fixable by next.js and not tRPC). But how to replicate the
getInitialProps
behaviour then?

Let's say I'm building a blog; due to SEO it's basically necessary to render my posts server-side. But when navigating through the site loading posts on the fly would be totally fine. How to do that without
ssr
?
Was this page helpful?