Server actions replacing TRPC?

Hello all, I’m currently working on converting all my projects from JS w/SCSS -> TS w/tailwind (yikes). Going pretty well for those parts, but I’m looking to modernize my data fetching, and was figuring that I should dive into TRPC. But from what I’m understanding, server actions should be able to fully replace TRPC and still provide full type safety. Am I correct on this? Then comes the question, if sever actions can replace TRPC, is it worth it? Does TRPC have benefits over what server actions offer?
6 Replies
Josh
Josh14mo ago
I would still recommend using trpc
Gabriel
Gabriel14mo ago
Hi, trpc is still a great solution. If you are really unsure, I would recommend waiting until next conf, as they might announce server actions becoming stable. It’s the most popular and requested feature so it might happen Nextconf is next week
cje
cje14mo ago
Server actions will be stable, it’s been merged into canary But “stable” just means “we won’t change the API under your feet from now on” IMO tRPC is still much better dx
Gabriel
Gabriel14mo ago
I agree with cje
deviana
deviana6mo ago
Guys what do you think about this now ? With next.js v15 and react v19, It seems like we can stop using tRPC
Luke
Luke5mo ago
@deviana I still use it for the developer experience and our companies specific use case (as a sort of middle-layer between our backend REST API and our next app, makes onboarding new devs with the type safety, etc, a breeze) They're also creating all kinds of new things that makes integrating it within server actions and this new landscape even better
Want results from more Discord servers?
Add your server