Huperniketes
Explore posts from serverstRPC + App directory + SSR - current state?
As written in the tRPC home page,
It only manages the creation and use of a web app’s APIs. So it sounds like it should work okay, as the biggest difference between the pages- and the app-routers rendering is where the server's page rendering code is situated, and not where the API code is. For SSR in the app-router, it's in the server component where you would use tRPC’s router.createCaller() interface for the APIs. In the pages-router, this code would be in getServerSideProps().
11 replies