-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monorepo with React Native + Next.js #775
Comments
Tjena, I know @cyrus-za has a monorepo setup with Nx - maybe he can share some insights? In the actual tRPC repo I have a monorepo-setup with lerna/yarn so maybe it's worth poking around here for inspo? The way I'd think would be nice for setup: .
└── packages
├── nextjs # <-- your next app, importing `@myorg/trpc`, exposing the endpoints
├── react-native # <-- importing `@myorg/trpc`
└── trpc # <-- your trpc routers without api handler Feel free to book a slot with me and I'll try to help you (for free) - super curious about the RN-stuff - https://calendly.com/alexdotjs/30min |
Would love having a chat with you about the setup, I'll book a slot 🥳 |
I would possibly separate the Be mindful of bundle sizes & prevent the accidental import of server stuff on the client. If you have one entry point and do I use preconstruct for trpc, see their docs about multiple entrypoints. If you have a |
It was great chatting to you! Excited to hear about how it'll work with RN. Would be great if you can share your progress and even more awesome if you'd like to do like a reference project with the monorepo setup 🙌 |
This issue has been locked because it had no new activity for 14 days. If you are running into a similar issue, please create a new issue. Thank you. |
Hello 👋
We built a nextjs website with trpc and it has worked wonderful 🙌 Now we're migrating the website to react-native and have setup a monorepo with
yarn workspace
andlerna
to keep backend in nextjs, but have the frontend in react-native. To share code I'm extracting thetrpc
code to acommon
-package and get some error. It's probably due to bad tsconfig (I'm not yet an ts-expert...).This error occurs when building the nextjs project:
I don't understand the errormessage. But if i go inte
node_modules/@trpc/react/dist/declarations/createReactQueryHooks.d.ts
and export all interfaces (e.g theUseTRPCInfiniteQueryOptions
-interface) the error goes away.My question is;
Does anyone understand the error and know how I should config my tsconfig to solve this?
Or, is this something that could be fixed by a version-update on trpc? 🙏
// Christopher
The text was updated successfully, but these errors were encountered: