Poonda
Best Monorepo Pattern for Sharing tRPC Logic Across Apps
Thanks,
what t3 turbo has is pretty much the state of our current app, in the example they are only sharing the tRPC router.
each application build the logic around the procedures.
In my case in need to share frontend logic that use the trpc calls.
Let take a simple example (my use case is more complex, that why i want to share the logic)
Let say in wrap this logic in a hook an put it in a shared package for the two app to use.
I need a way to inject the
api
trpc client for this hook.6 replies
Forward NextJs Request to TRPC Server
About the context to why I want to split the server.
First of all all of the code sit in a Turbo monorepo.
we have a react-native app, and a nextjs web-app that both need to talk to the TRPC server for the common logic. as of today i have my TRPC server on NextJs and React Native is talking to next server with TRPC.
The problem we have is that each time i need to update some TRPC procedure I need to deploy and release NextJs as well, which is not favorable for us.
10 replies