Styled Components
// Prompt: "Create styled button with:// - Multiple variants// - Press animations// - Loading states// - NativeWind classes"
Supercharge your Expo development workflow with Cursor IDE and Claude Code. These patterns cover the managed workflow, EAS Build, Expo Router, and the unique advantages of building React Native apps with Expo’s comprehensive toolkit.
claude "Initialize Expo managed workflow with authentication template"
// Cursor prompt for app structure:"Set up Expo Router with:- Tab navigation with (tabs) layout- Stack navigation in each tab- Modal routes- Dynamic routes with [id]- Protected routes with auth check- Deep linking configuration"
// Generated structure:app/ (tabs)/ _layout.tsx index.tsx profile.tsx settings.tsx (auth)/ login.tsx register.tsx post/ [id].tsx modal.tsx _layout.tsx
// Cursor Agent prompt:"Create tab layout with:- Custom tab bar component- Icon animations- Badge notifications- Platform-specific styling"
// Prompt: "Implement stack navigation with:// - Custom header// - Gesture handling// - Screen transitions// - Back button override"
// Comprehensive styling prompt:"Configure NativeWind with:1. Tailwind config for mobile2. Custom theme colors3. Dark mode support4. Platform-specific classes5. Responsive breakpoints"
Styled Components
// Prompt: "Create styled button with:// - Multiple variants// - Press animations// - Loading states// - NativeWind classes"
Theme System
// Prompt: "Implement theme with:// - Color schemes// - Typography scale// - Spacing system// - Component variants"
// Camera implementation prompt:"Implement camera feature using Expo Camera with:- Photo and video capture- Camera switching- Flash control- Media library saving- Permissions handling- Error states"
// Notification setup prompt:"Configure push notifications with:- Expo Notifications setup- FCM/APNs configuration- Local notifications- Notification handlers- Deep linking from notifications- Analytics tracking"
// State management prompt:"Set up Zustand for Expo app with:- Persistent storage using SecureStore- Authentication state- App settings- Offline data queue- DevTools integration"
// API state management:"Configure React Query with:- Expo SQLite persistence- Offline support- Background refetch- Optimistic updates- Error boundaries"
// Cursor prompt: "Configure EAS Build for development with:// - iOS simulator build// - Android emulator build// - Development client// - Environment variables"
// Prompt: "Set up production builds with:// - App signing// - Store configuration// - OTA updates// - Build versioning"
// CI/CD setup prompt:"Create GitHub Actions workflow for:- Automated EAS builds- Preview builds on PR- Production deployment- OTA update triggers- Version management"
// Test generation prompt:"Write tests for Expo components using:- Jest and React Native Testing Library- Expo modules mocking- Navigation testing- Gesture testing- Snapshot tests"
Performance Patterns
AI can implement:
// Analytics setup prompt:"Implement analytics with:- Expo Analytics- Custom event tracking- Performance monitoring- Crash reporting- User properties"
// Complete auth prompt:"Implement authentication using:- Expo AuthSession- Social providers (Google, Apple, Facebook)- Secure token storage- Biometric authentication- Session management"
// File handling prompt:"Create file management system with:- Document picker- Image picker with editing- File upload with progress- Download management- Cache control"
// Advanced routing prompt:"Implement dynamic routing with:- Catch-all routes- Optional parameters- Route groups- Layout routes- API routes"
// Auth guard implementation:"Create route protection with:- Authentication checks- Role-based access- Redirect logic- Loading states- Deep link preservation"
// Module creation prompt:"Create custom Expo module for:- Native functionality not in SDK- iOS and Android implementation- TypeScript definitions- Example app- Documentation"
// Debugging setup:"Configure debugging environment with:- React DevTools- Expo Dev Tools- Performance monitor- Network inspector- Redux DevTools"
Comprehensive Error Strategy
Implement with AI:
// Structure prompts like:"Create [feature] for Expo using:- SDK version: [version]- Platforms: [iOS/Android/Web]- Key requirements: [list]- Expo modules needed: [list]- Include error handling and loading states"
SDK Compatibility
Always mention SDK version and required Expo modules
Managed vs Bare
Specify workflow type for accurate implementations
Platform Differences
Request platform-specific handling when needed
Performance
Ask for Expo-optimized solutions
// Web compatibility prompt:"Add web support to Expo app with:- Responsive design- SEO optimization- PWA configuration- Platform-specific components- Navigation adaptation"
// Monorepo configuration:"Set up Expo in monorepo with:- Shared packages- Multiple apps- Common components- Build configuration- Workspace setup"