5 ms·
I've used tRPC and Next.js for a couple of personal projects and it's been a great experience. Hard to beat on iteration speed, especially when used with a pre-
by pimpl 3y ago
I've used tRPC and Next.js for a couple of personal projects and it's been a great experience. Hard to beat on iteration speed, especially when used with a pre-configured template like Create T3 App: https://create.t3.gg/ https://create.t3.gg/.
- Void_ 3y agoDoes it now work properly with Next 13 and server components?
- pimpl 3y agoI think patterns and best practices are still yet to be figured out. I believe you can create caller in a server component and it should work (https://trpc.io/docs/server/server-side-calls#create-caller https://trpc.io/docs/server/server-side-calls#create-caller), but the pages router appears to be a battle-tested solution.
- aCoreyJ 3y agoIn server components you can just await in the component itself so you don't need a solution like tRPC.
- tough 3y agoCould you expand on this? You don't need it, but you certainly can prefer to use it regardless? Hoping react-server-components <> trpc gets solved soon
- ushakov 3y agoIf you use Server Actions, you can just call a server function from your frontend directly, no need for middleware like tRPC https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions https://nextjs.org/docs/app/building-your-application/data-f...
- tough 3y agoThank you I only briefly read about them before and didn't consider them properly. Will try out calling the database directly there, but I kinda liked how with tRPC I can add validation/auth checks etc/ will have to see how I develop my own strategy for that w server actions.
- ushakov 3y agoYou can use zact for that https://github.com/pingdotgg/zact https://github.com/pingdotgg/zact
- welder 3y agoI'm using it with Next 13, but not using the new experimental app folder yet. No issues yet.