Getting Started
What is Expo?
What is Expo?
- A comprehensive SDK with native modules
- Development tools and CLI
- Build and deployment services (EAS)
- Over-the-air updates
- A managed workflow for easier development
Do I need to know native development to use Expo?
Do I need to know native development to use Expo?
- Managed workflow: No native knowledge required
- Custom native code: You can drop down to native code when needed
- Config plugins: Many native customizations can be done without writing native code
Can I use Expo in an existing React Native app?
Can I use Expo in an existing React Native app?
-
Install Expo packages in any React Native app:
-
Use individual Expo modules:
- Adopt Expo gradually without rewriting your app
What's the difference between Expo Go and development builds?
What's the difference between Expo Go and development builds?
- Sandbox app with pre-installed Expo SDK
- Quick prototyping and learning
- Limited to Expo SDK modules
- No custom native code
- Your actual app with development tools
- Supports any native library
- Custom native code allowed
- More flexibility, closer to production
Project Setup
How do I create a new Expo project?
How do I create a new Expo project?
What's the difference between app.json and app.config.js?
What's the difference between app.json and app.config.js?
- Static JSON configuration
- Simple and straightforward
- No logic or dynamic values
- Dynamic JavaScript configuration
- Access environment variables
- Conditional logic
- Function-based configuration
app.config.js takes precedence.How do I add TypeScript to my project?
How do I add TypeScript to my project?
-
Rename files from
.jsto.tsxor.ts -
Create
tsconfig.json: -
Install types:
- Start developing with TypeScript!
Development
How do I run my app on a physical device?
How do I run my app on a physical device?
- Install Expo Go from the App Store or Google Play
- Run
npx expo start - Scan the QR code with your device
- Build your app:
eas build --profile development - Install the build on your device
- Run
npx expo start --dev-client - Open the app on your device
How do I debug my app?
How do I debug my app?
- Logs appear in the terminal automatically
- Use
console.log(),console.warn(),console.error()
- Install React Native Debugger
- Press ‘j’ in the terminal
- Debug in the standalone app
- Install React Native Tools extension
- Configure launch.json
- Set breakpoints and debug
How do I clear the cache?
How do I clear the cache?
Why is my app loading slowly in development?
Why is my app loading slowly in development?
- Metro cache: Clear with
--clearflag - Large dependencies: Check bundle size
- Network connection: Use LAN or localhost
- Debug mode overhead: Normal in development
- Source maps: Slow but necessary for debugging
Configuration
How do I add custom fonts?
How do I add custom fonts?
-
Install expo-font:
-
Load fonts:
- Fonts load automatically on subsequent launches
How do I use environment variables?
How do I use environment variables?
-
Create
.envfile (optional): -
Access in code:
-
Or use
app.config.js:Then access via Constants:
EXPO_PUBLIC_ are available in app code.How do I change the app icon and splash screen?
How do I change the app icon and splash screen?
- Create a 1024x1024 PNG image
- Update
app.json:
- Create your splash image
-
Update
app.json: - Rebuild your app
Building & Deployment
How do I build my app for production?
How do I build my app for production?
-
Install EAS CLI:
-
Configure EAS:
-
Build for iOS and Android:
- Download and test the build
Can I build locally without EAS?
Can I build locally without EAS?
- Cloud building (no native toolchain needed)
- Consistent environment
- Easier signing and credentials management
- Build caching
How do I submit my app to the App Store and Google Play?
How do I submit my app to the App Store and Google Play?
-
Build your app:
-
Submit to stores:
What are OTA updates and how do I use them?
What are OTA updates and how do I use them?
-
Configure updates:
-
Publish update:
- Users get the update on next app launch
- JavaScript/assets only (no native code changes)
- Requires expo-updates package
- Users must have compatible native code
Native Modules & Libraries
Can I use any React Native library with Expo?
Can I use any React Native library with Expo?
- Expo SDK modules - Pre-configured and tested
- React Native core - All React Native features
- Community libraries - Most work out of the box
- Native modules - With custom development builds
- Config plugins (for some), or
- Custom development builds
How do I add a library with native code?
How do I add a library with native code?
-
Install the library:
-
Check if it needs a config plugin:
-
Rebuild your app:
What are config plugins?
What are config plugins?
Common Errors
Error: Metro bundler failed to start
Error: Metro bundler failed to start
-
Clear cache:
- Check port availability (default 8081)
-
Kill existing Metro processes:
-
Reinstall dependencies:
Error: Unable to resolve module
Error: Unable to resolve module
- Missing dependency
- Incorrect import path
- Cache issue
- Case sensitivity (especially on Linux)
-
Install missing package:
-
Clear cache:
-
Check import paths:
- Restart Metro
Error: Invariant Violation: Native module cannot be null
Error: Invariant Violation: Native module cannot be null
- Native module not linked
- Module not installed
- Incompatible versions
-
For new modules, rebuild:
-
Check module installation:
-
Verify config plugin is added:
Performance
How can I improve my app's performance?
How can I improve my app's performance?
-
Use Hermes:
-
Optimize images:
- Use appropriate sizes
- Compress images
- Use WebP format
-
Lazy load components:
-
Memoize expensive computations:
-
Use FlatList for long lists:
How do I reduce my app's bundle size?
How do I reduce my app's bundle size?
-
Analyze bundle:
-
Remove unused dependencies:
-
Tree shake properly:
- Use Hermes (smaller bundle)
- Enable minification (production only)
Monorepos
Can I use Expo in a monorepo?
Can I use Expo in a monorepo?
- Yarn Workspaces
- npm Workspaces
- pnpm
- Turborepo
- Nx
Getting Help
Where can I get help?
Where can I get help?
- Documentation: docs.expo.dev
- Forums: forums.expo.dev
- Discord: chat.expo.dev
- GitHub: github.com/expo/expo
- Stack Overflow: Tag questions with
expo