How can I do TRPC with next multiple zones

I'm wondering if anyone has had any luck with this https://github.com/vercel/next.js/tree/canary/examples/with-zones
GitHub
next.js/examples/with-zones at canary · vercel/next.js
The React Framework. Contribute to vercel/next.js development by creating an account on GitHub.
3 Replies
Liam
Liam•2y ago
I'd assume you'd have to do something weird where your TRPC stuff is its own package in something like a monorepo. IIRC ct3a-turbo (https://github.com/t3-oss/create-t3-turbo) does this between a next app and react native app. TRPC always gets a bit funky once you start using multiple code bases. The other thing you could do if one of the code bases only has to make a few calls to TRPC is use https://github.com/jlalmes/trpc-openapi to be able to call TRPC easier as a REST API. While you might forgo some of the benefits and DX of TRPC in that code base, it might be easier than splitting out TRPC.
Kova
KovaOP•2y ago
I wonder could I have two seperate tRPC implementations with routers and just move the logic into a shared folder for them both to reference 🤔
Liam
Liam•2y ago
Yeah, I have not actually done this before so I would not know. Best of luck though! Might consider checking over in the TRPC discord, someone might have done this before there: https://discord.gg/trpc-867764511159091230 It turns out that https://discord.gg/trpc is not trpc's discord invite lmao
Want results from more Discord servers?
Add your server