[TanStack Start] Server functions: Could we add first-class tRPC support until server functions reach tRPC feature parity? #3884
Replies: 3 comments 1 reply
-
I'm genuinely interested in understanding TanStack's server function roadmap. If server functions don't plan to support features like batching and contract export in the near future, and considering server function's incompatibility with other frameworks compared to libs like tRPC, I'm struggling to see compelling reasons to choose server functions over alternatives like oRPC or tRPC. Is the primary benefit of server functions to have server code defined within frontend files? |
Beta Was this translation helpful? Give feedback.
-
I'm curious to know what you mean by first-class support more than what's already available?
https://tanstack.com/start/latest/docs/framework/react/examples/with-trpc |
Beta Was this translation helpful? Give feedback.
-
Let me clear some things up:
server functions are not a reinvention of the wheel since they fundamentally do something that none of these tools do with regards to isomorphism, code splitting and colocation. We have no plans to replicate any full stack public api design tools including TRPC. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Honest question here. Why is TanStack Start competing against tRPC by making their own custom RPC implementation? Doesn't tRPC work great already? I've got a working (production-grade) TSS + tRPC project going and it's a lot of fun. From batch queries to type-safe automatic query key generation for invalidating queries.
I tried working with TSS's server functions and they felt very primitive and basic.
And I also saw that TanStack Start removed the tRPC examples, which tells me that TSS is trying to replace tRPC altogether, when tRPC is clearly the educated choice thanks to its maturity, stability, API feature richness, DX, and so on.
@KATT and @tannerlinsley, didn't you discuss a possible first-class solution for TanStack Start and tRPC? At least for TSS's inception (maybe up to v2, when TSS could have their own mature RPC implementation). This would make tRPC a transitionary helper so that TSS has more features out of the box from very early stages, preceding a more robust, proprietary RPC system.
Please consider adding first-class tRPC support, at least as an officially supported alternative to server functions.
Hope this makes sense and can be a productive conversation starter.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions