Demonstrates the use of expo-yarn-workspaces
with Expo.
This example installs a monorepo with two applications, both using two separate custom packages.
- Create a new monorepo with
npx create-react-native-app --template with-yarn-workspaces
.- Packages will be automatically installed via the
postinstall
script inpackage.json
- Packages will be automatically installed via the
- Run
yarn app
to start the app.
├── apps
│ └── app
│ ├── App.js ➡️ Entry Point for the app
│ ├── package.json ➡️ contains configuration required by expo-yarn-workspaces
│ └── metro.config.js ➡️ required by expo-yarn-workspaces
├── packages
│ └── expo-custom
│ └── src/index.tsx ➡️ exports a custom message which is imported and displayed in the app
├── package.json ➡️ contains the `postinstall` script and scripts with yarn commands to run applications
└── babel.config.js ➡️ Babel config (should be using `babel-preset-expo`)