Ahmed Elsakaan
What is tRPC, when and where should I use it?
So case scenario for example:
You have a react web app, a mobile app and a desktop app lets say.
You want your server in typescript, then trpc would be a perfect fit because you don't need to go through the traditional openapi specs + generating types on these frontends
10 replies
What is tRPC, when and where should I use it?
If you're only going to have one app for example nextjs, then probably server actions will do you just fine.
tRPC is beneficial when you want a dedicated API that you have multiple consumers of like a react app and a react native app for example.
Basically trpc is just a rest API framework just benefit is that you don't need to generate types on the frontend to consume the API endpoints and it integrates with things like react query really easily
10 replies
tRPC and vite serverless, are there any exmaples?
vite by default isn't a full stack type of tool, so it can't be compared with nextjs fully. What I would recommend if you're going with that route is to just have tRPC as it's own server using the standalone adapter and seeing if that works for you, you can use other adapters like fastify for example if you need something more than that.
21 replies