React Native Expo Template Commands
Specialized commands for building cross-platform mobile applications with React Native and Expo.
Overview
The React Native template provides 10 commands optimized for mobile app development, covering native features, offline capabilities, and seamless backend integration.
Available Commands
Screens & Navigation
add-screen- Create new app screens with navigationimplement-deep-linking- Set up deep links and universal links
Native Features
setup-push-notifications- Configure push notificationsadd-in-app-purchase- Implement in-app purchasessetup-crash-reporting- Add crash reporting and analytics
Data & Sync
add-offline-sync- Enable offline data synchronizationsync-data-models- Synchronize data models with backendadd-api-client- Create type-safe API client
Backend Integration
setup-shared-backend- Connect to shared backend (Supabase, Firebase)
Performance
optimize-bundle-size- Reduce app bundle size
Usage Examples
Building a Complete Screen
bash
/template add-screen UserProfile
/template add-screen Settings
/template implement-deep-linking user/:idSetting Up Notifications
bash
/template setup-push-notifications firebase
/template add-screen NotificationSettingsOffline Capabilities
bash
/template add-offline-sync watermelondb
/template sync-data-models User,Post,Comment
/template add-api-clientE-commerce Features
bash
/template add-in-app-purchase
/template add-screen Store
/template add-screen PurchaseHistoryKey Features
Expo SDK Integration
Commands leverage Expo's managed workflow:
- expo-notifications for push
- expo-in-app-purchases for IAP
- expo-linking for deep links
- expo-secure-store for sensitive data
Cross-Platform Support
All commands generate code that works on:
- iOS (iPhone & iPad)
- Android (phones & tablets)
- Web (when applicable)
Type Safety
- Full TypeScript support
- Type-safe navigation
- Typed API responses
- Schema validation
Performance Optimized
- Lazy loading screens
- Image optimization
- Bundle splitting
- Memory management
Best Practices
- Design Mobile-First: Consider touch interactions and screen sizes
- Test on Devices: Use Expo Go and physical devices
- Handle Offline: Always consider offline scenarios
- Optimize Assets: Compress images and minimize bundle size
- Platform Differences: Test iOS and Android separately
Common Workflows
Authentication Flow
bash
/template add-screen Login
/template add-screen Signup
/template add-screen ForgotPassword
/template setup-shared-backend supabase-authSocial Features
bash
/template add-screen Feed
/template add-screen Profile
/template add-screen Chat
/template setup-push-notifications
/template add-offline-syncSettings & Preferences
bash
/template add-screen Settings
/template add-screen AccountSettings
/template add-screen NotificationPreferences
/template add-screen PrivacySettingsPlatform-Specific Features
iOS Specific
bash
# Apple Sign In
/template setup-shared-backend apple-signin
# iOS widgets
/template add-feature ios-widgetAndroid Specific
bash
# Google Sign In
/template setup-shared-backend google-signin
# Android shortcuts
/template add-feature android-shortcutsNavigation Patterns
The template uses React Navigation v6:
bash
# Tab navigation
/template add-screen Home --tab
/template add-screen Search --tab
/template add-screen Profile --tab
# Stack navigation
/template add-screen Details --stack
/template add-screen EditProfile --stackState Management
Commands integrate with:
- Zustand for global state
- React Query for server state
- MMKV for persistent storage
- Context API for theme/auth
Integration with Core Prompts
Use React Native commands with core Orchestre prompts:
bash
# Plan the mobile app
/orchestrate "Build fitness tracking app"
# Implement screens
/template add-screen WorkoutList
/template add-screen WorkoutDetail
/template add-screen Progress
# Add features
/template setup-push-notifications
/template add-offline-sync
# Review and optimize
/review
/template optimize-bundle-sizeTesting
Commands include:
- Jest unit tests
- Detox E2E tests
- Component testing
- Snapshot testing
bash
# After adding screens
/template setup-testing detoxDeployment
Build and deploy:
bash
# iOS
eas build --platform ios
eas submit --platform ios
# Android
eas build --platform android
eas submit --platform androidCommon Patterns
Access React Native patterns in .orchestre/patterns/react-native-expo/:
- Navigation patterns
- Authentication flows
- Data synchronization
- Performance optimization
- Platform-specific code
