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 first-app
oryarn second-app
to start one of the apps.
โโโ apps
โ โโโ first-app
โ โ โโโ App.tsx โก๏ธ Entry Point for first application
โ โ โโโ package.json โก๏ธ contains configuration required by expo-yarn-workspaces
โ โ โโโ metro.config.js โก๏ธ required by expo-yarn-workspaces
โ โโโ second-app
โ โโโ App.tsx โก๏ธ Entry Point for second application
โ โโโ package.json โก๏ธ contains configuration required by expo-yarn-workspaces
โ โโโ metro.config.js โก๏ธ required by expo-yarn-workspaces
โโโ packages
โ โโโ first-package
โ โ โโโ index.js โก๏ธ exports first package message which is imported and displayed in both applications
โ โโโ second-package
โ โโโ index.js โก๏ธ exports second package message which is imported and displayed in both applications
โโโ 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`)