Amplify supports building and previewing Expo/React Native mobile applications directly in the browser using the Expo Go runtime inside WebContainers.
Expo in WebContainers
The Expo App starter template provides a complete Expo project that runs inside the WebContainer sandbox. When you select the Expo template, Amplify:
- Injects the Expo starter template from
Amplytic-Labs/Expo-Starter-Template - Runs
npm installon the init terminal (auto-setup) - Starts
expo startas a backgrounded process viaspawnDetached() - Detects the Expo URL from terminal output
- Shows a QR code modal for testing on your physical device
Expo URL detection
The AmplifyShell class watches terminal output for Expo URLs via the regex:
/(exp:\/\/[^\s]+|https?:\/\/[^\s]+\.boltexpo\.dev[^\s]*)/
When a URL is detected, it's stored in the expoUrlAtom Nanostore and displayed in the ExpoQrModal component.
Expo QR Code Preview
Instead of the standard iframe preview, Expo projects show a QR code modal (ExpoQrModal.tsx) that:
- Displays a QR code with the Expo Go deep link
- Converts
exp://URLs to Expo Go universal links:https://expo.go/--/to?exp=... - Shows an "Open in Expo Go" button on mobile devices
- Provides the direct URL for manual entry
How to use:
- Install Expo Go on your iOS or Android device
- Scan the QR code shown in Amplify's preview area
- The Expo Go app loads your project and renders it on your device
Expo Router support
The Expo starter template includes Expo Router : a file-based routing system for React Native:
- File-based navigation : Routes defined by file structure in the
app/directory - Deep linking : Automatic deep link support for each route
- Type-safe navigation : TypeScript support for route params
- Layouts : Shared layouts with
_layout.tsxfiles
The AI is instructed to use Expo Router conventions when building mobile apps. The mobile-app-development design skill provides detailed guidance for screen navigation, tab bars, and modal presentation.
Example Expo Router file structure
app/ _layout.tsx — Root layout with Stack navigator index.tsx — Home screen login.tsx — Login screen profile.tsx — Profile screen tabs/ _layout.tsx — Tab navigator layout home.tsx — Tab: Home settings.tsx — Tab: SettingsEach file exports a React component that becomes a route. The
_layout.tsxfiles define the navigation container.
Expo project setup
When you create an Expo project in Amplify:
- Template is injected with files from GitHub
runProjectAutoSetup()executes:npm installon the init terminal (waits for completion)npx expo startviaspawnDetached()(backgrounded)
- The dev server starts and the Expo URL appears
- QR modal renders automatically
Template detection
Amplify detects Expo projects via: isExpo = template.tags?.includes('expo') || template.name.toLowerCase().includes('expo'). When an Expo project is detected, the QR code modal replaces the standard iframe preview.
Limitations and considerations
Expo in WebContainers has specific limitations:
| Limitation | Detail |
| Expo Go required | Must install Expo Go app on physical device; no browser preview |
| No native compilation | Cannot build standalone .apk/.ipa; Expo Go handles native modules |
| Limited native APIs | Only APIs available in Expo Go client (no custom native modules) |
| Performance constraints | WebContainer has memory limits; large Expo projects may struggle |
| No native binary modules | Same WebContainer limitations apply (no sharp, bcrypt, etc.) |
| Expo Router only | Best experience with Expo Router; bare React Native less supported |
Learn about the Next.js runtime