Skip to content

Latest commit

 

History

History
 
 

with-yarn-workspaces

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Expo Yarn Workspaces Example

Supports Expo iOS Supports Expo Android Supports Expo Web

Demonstrates the use of a Yarn Workspace Monorepo with Expo. This example installs a monorepo with an application using a separate custom package.

🚀 How to use

  • Create a new monorepo with npx create-react-native-app --template with-yarn-workspaces.
  • Run yarn watch-packages to build and watch the packages.
  • Run yarn start-app to start the app.
  • Edit the code in packages/expo-custom/src and watch it live-reload in the app!

📁 File Structure

├── apps
│   └── mobile
│       ├── index.js ➡️ Entry point for the app
│       ├── App.js ➡️ App root component
│       ├── 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
│       └── src/tsconfig.json ➡️ default TypeScript configuration for expo-module-scripts
├── package.json ➡️ contains yarn commands to run applications
└── babel.config.js ➡️ Babel config (should be using `babel-preset-expo`)

📝 Notes

This example uses the configuration described in the Expo Monorepos Guide