Set up CRA and barebone RN in the same monorepo as a code-sharing experiment for future boilerplates. Followed the great guide at https://medium.com/viewstools/how-to-use-yarn-workspaces-with-create-react-app-and-create-react-native-app-expo-to-share-common-ea27bc4bad62 and:
- Skip Views Tools to keep this as lightweight as possible.
- Use react-native CLI to init a barebone RN setup instead of CRNA.
- Use https://github.com/viewstools/yarn-workspaces-cra-crna/blob/master/crna-make-symlinks-for-yarn-workspaces/index.js in
native
and remove reference to Expo to prevent breakage.
- Clone/fork the repo
git clone [email protected]:cheshirecode/cra-rni-monorepo.git
cd cra-rni-monorepo
- Run
yarn
once to grab all dependencies. - Start web development build
yarn start:web
. - Run the RN bundler
yarn start:bundler
. - Run the RN iOS/Android simulator
yarn start:ios
oryarn start:android
. - Edit some files in
core
folder and see the magic!
Thanks goes to these wonderful people (emoji key):
cheshireCode 💻 |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!