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
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 NextApp1
into a shared packages/common
or 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 react.tsx
and shared.tsx
into the shared package?
- I am using Clerk, how do I ensure it is getting passed into TRPC in the react native code?
Is there a good example out there of all this?Solution:Jump to solution
I found this example https://github.com/t3-oss/create-t3-turbo/tree/main
GitHub
GitHub - t3-oss/create-t3-turbo: Clean and simple starter repo usin...
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
3 Replies
Because this covered so many technologies I thought this might be the best group to help
Solution
I found this example https://github.com/t3-oss/create-t3-turbo/tree/main
GitHub
GitHub - t3-oss/create-t3-turbo: Clean and simple starter repo usin...
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
which helped a lot.