T3 Stack with React Native and Multiple NextJS with Turbo & Clerk
So I am building a project that has 3 distinct NextJS applications, 1 react native application. I have set up a project with a simple structure like this:
I created all 3 of the next apps with
I created all 3 of the next apps with
create-t3-app and they are working great and are pretty isolated TRPC instances. So they each have their own routers and such which I could consolidate. But my question is what is the best pattern for introducing the ReactNativeApp into the equation. It will basically need to use the same TRPC service as NextApp1 for example. So here are my actual questions:- Should I move the routes for
NextApp1into a sharedpackages/commonor some other package name? - When I do that, what do I need to change in the NextApp1 to handle this?
- Would I just move the
andreact.tsxshared.tsxinto the shared package? - I am using Clerk, how do I ensure it is getting passed into TRPC in the react native code?
Solution
I found this example https://github.com/t3-oss/create-t3-turbo/tree/main
GitHub
Clean and simple starter repo using the T3 Stack along with Expo React Native - GitHub - t3-oss/create-t3-turbo: Clean and simple starter repo using the T3 Stack along with Expo React Native