vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.39k stars 1.84k forks source link

Examples: Universal app w/ React Native + React Native Web in Next.js + Turbo #1119

Closed jaredpalmer closed 2 years ago

jaredpalmer commented 2 years ago

Describe the feature you'd like to request

Add example(s) of a universal app with built React Native, React Native Web, and Next.js with various popular React Native setups

Describe the solution you'd like

Should be similar to https://github.com/nandorojo/solito/tree/master/example-monorepos/blank. We should connect with React Native experts to determine what libraries / navigation primitives should ship in the example(s).

Describe alternatives you've considered

N/A

SushritPasupuleti commented 2 years ago

This would be great, I just started using turborepo with the exact same setup in mind, and came here after looking at solito.

prometheas commented 2 years ago

My team and I have a React Native mobile app and are about to replace a Python-based API service with a Nest.js reimplementation, which will also have a Next.js backoffice app (and maybe, in future, also a Next.js customer-facing app, though that's less certain).

While it would have been ideal to have already found this at the ready, I'd be interested in participating in any effort that may arise from this issue, fwiw.

nandorojo commented 2 years ago

Happy to help here. You’ll likely have the same starter as solito, but if you want it to be as bare as possible, we could remove some of the libraries. I would probably remove Dripsy (used for styling), but leave the remaining libs (like Reanimated/Moti) since these are used in most RN apps these days. Depends how low level you want the starter to be.

As for navigation, we could add tabs and drawers and things like that too.

prometheas commented 2 years ago

So, I did ultimately manage to prove the concept for my team. I wound up using expo to create a new project, then immeidately eject it, without adding any additional libs.

I had to add a dev task to the react native project, so that it could “participate” in the turbo run dev command from the examples, but it really worked out great.

Functionally, it’s “there”, but I haven’t yet arrived to a great release strategy (was trying to avoid introducing Lerna, but not sure how to release automation / versioning without it…