nandorojo / solito

🧍‍♂️ React Native + Next.js, unified.
https://solito.dev
MIT License
3.54k stars 180 forks source link

Mixed nextjs web + react native #25

Closed rodbs closed 2 years ago

rodbs commented 2 years ago

I have a Nextjs website, which has a part that I'd like to keep just web (http://xxx.com/blog ) , and other part that I'd like to share with React Native (http://xxx.com/app) . Is it possible? How can I do it while keeping everything in the same repo? I mean, I don't want the blog side to appear in the app for react native.

Thanks

nandorojo commented 2 years ago

The app and website never speak to each other, so achieving this is simple. You do exactly what you think you'd do: only import pages on Next.js that you want on Next.js. If you don't want them on the app, don't import them inside of apps/expo. And that's all!

nandorojo commented 2 years ago

To clarify, any monorepo code that isn't imported in the next site/mobile app will never show up there. You have to import it somehow for it to be shown to a user.

rodbs commented 2 years ago

Ok, I think I understand what you mean! Thanks!