Expo provides a streamlined development workflow with fast iteration, instant previews, and powerful debugging tools. This guide covers the complete development cycle from writing code to seeing it run on devices.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/expo/expo/llms.txt
Use this file to discover all available pages before exploring further.
Development Cycle Overview
Starting Development
Launch Dev Server
Start the development server with:What Happens When You Start
Metro Bundler Starts
Metro bundler launches on port 8081, ready to transform and bundle your JavaScript
Dev Server Starts
HTTP server starts to serve:
- App manifest (configuration)
- JavaScript bundles
- Source maps
- Assets (images, fonts)
Fast Refresh
Fast Refresh updates your app instantly when you save files, preserving component state.How Fast Refresh Works
What Gets Preserved
Preserved during Fast Refresh:
- Component state (useState, useReducer)
- Navigation state
- Form inputs
- Scroll position
Example: Fast Refresh in Action
app/index.tsx
<Text> content and save, the change appears instantly without resetting count.
Development Server Features
Interactive Terminal
While the dev server is running, you can:| Key | Action |
|---|---|
a | Open on Android emulator/device |
i | Open on iOS simulator |
w | Open in web browser |
r | Reload app |
m | Toggle developer menu |
c | Show project QR code |
j | Open React DevTools (web) |
o | Open project in editor |
Developer Menu
Access the developer menu:- iOS Simulator: Cmd+D
- Android Emulator: Cmd+M (Mac) or Ctrl+M (Windows/Linux)
- Physical Device: Shake the device
- Terminal: Press
m
- Reload
- Debug Remote JS (legacy)
- Enable Fast Refresh
- Toggle Element Inspector
- Toggle Performance Monitor
- Open React DevTools
Element Inspector
Inspect UI elements in your app:- Open developer menu
- Select “Toggle Element Inspector”
- Tap any element to see its properties
Performance Monitor
Monitor app performance:- Open developer menu
- Select “Toggle Performance Monitor”
- View real-time metrics:
- JS thread FPS
- UI thread FPS
- RAM usage
- Bridge traffic
Metro Bundler
Metro is the JavaScript bundler that powers Expo development.Metro Configuration
Customize Metro inmetro.config.js:
metro.config.js
Metro Commands
Asset Handling
Metro automatically handles: Images:Build Types
Development Builds
Development builds include your exact dependencies and allow for custom native code. When to use:- Need custom native modules
- Using libraries not in Expo Go
- Configuring native project settings
- Testing production-like behavior
Expo Go Builds
Expo Go is a pre-built app with common SDK modules. When to use:- Learning Expo
- Prototyping quickly
- Only using Expo SDK modules
- Sharing demos
- No custom native code
- Limited to included SDK modules
- Some libraries incompatible
What's included in Expo Go?
What's included in Expo Go?
Expo Go includes these SDK modules:
- Camera, Location, Sensors
- FileSystem, SQLite, SecureStore
- Notifications, Updates
- Image Picker, Document Picker
- Video, Audio, AV
- And 40+ more…
Production Builds
Production builds are optimized for app stores.- Code minification
- Dead code elimination
- Asset optimization
- Source map generation
- Bundle splitting
Debugging
React DevTools
Debug React components:- Component tree inspection
- Props and state viewer
- Performance profiling
- Hook debugging
Console Logs
View console output in terminal:- Terminal (where
expo startis running) - React DevTools console
- Browser console (web)
Debugging Native Code
iOS (Xcode):- Open
ios/YourApp.xcworkspacein Xcode - Set breakpoints in Swift/Objective-C code
- Run from Xcode with debugging
- Open
android/folder in Android Studio - Set breakpoints in Kotlin/Java code
- Run with debugger attached
Network Debugging
Inspect network requests:Environment Configuration
Environment Variables
Useexpo-constants for environment-specific config:
app.config.js
Development vs Production
Check environment:Common Workflows
Adding a New Screen
Installing a New Package
Testing on Physical Device
Can't connect?
Can't connect?
If scanning doesn’t work:
-
Try tunnel mode:
- Check firewall settings
-
Use USB connection:
Then connect via USB debugging
Performance Best Practices
Optimize Re-renders
Optimize Re-renders
Use React.memo and useMemo to prevent unnecessary re-renders:
Lazy Load Screens
Lazy Load Screens
Use dynamic imports for screens:
Optimize Images
Optimize Images
Use optimized image formats and sizes:
Monitor Performance
Monitor Performance
Use React DevTools Profiler:
Troubleshooting
Metro bundler stuck
Metro bundler stuck
Clear cache and restart:
Fast Refresh not working
Fast Refresh not working
- Check for syntax errors
- Ensure file is in
app/orsrc/ - Manually reload: Press
rin terminal
White screen on load
White screen on load
Check for:
- JavaScript errors in terminal
- Missing imports
- Incorrect file paths
- Network connectivity issues
Native module errors
Native module errors
Rebuild the app:
Next Steps
Expo Go
Learn about the Expo Go app
Tutorial
Build a complete app
Build & Deploy
Ship your app to production
SDK Reference
Explore all SDK modules