Simple SSR + Hydration with tRPC and Next.js 13

I would like to see a simple example, where on server side all users are queried and the view with all these users are served. (Something like <Table data={users} />) I also want the option to search users by name but it should hydrate the view, so I want only get JSON from the server and re-render the view. I do not know how to do that, since I have components that require "use client" Hope it is clear what I am looking for 😊
2 Replies
aditya
aditya•17mo ago
i dont think trpc works with next 13 app dir yet if you want ssr just use RSC
RockBacon
RockBacon•17mo ago
Another alternative is to use both the app and pages router at the same time. I found this repo and it was a great use to me. https://github.com/RockBacon9922/next-app-router-trpc-drizzle-planetscale-edge
GitHub
GitHub - RockBacon9922/next-app-router-trpc-drizzle-planetscale-edg...
Experimental edge stack full of sweet and fancy features for you to play with - GitHub - RockBacon9922/next-app-router-trpc-drizzle-planetscale-edge: Experimental edge stack full of sweet and fancy...
Want results from more Discord servers?
Add your server