React Native + Expo Rules
RulesAgent rules for React Native projects using Expo, TypeScript, and React Navigation.
1803/23/2026
markdown1 file
CLAUDE.md900 B
CLAUDE.md — React Native (Expo)
Commands
npx expo start— start dev servernpx expo run:ios— run on iOS simulatornpx expo run:android— run on Android emulatornpm test— run tests
Code Style
- Use TypeScript for all files
- Use React Navigation for routing
- Use Zustand for state management
- Use React Query for server state
- Use StyleSheet.create for styles (not inline objects)
- Use Expo modules over bare React Native where available
Platform Differences
- Use Platform.select or Platform.OS for platform-specific code
- Test on both iOS and Android
- Use SafeAreaView for notch handling
- Use KeyboardAvoidingView for forms
Performance
- Use FlatList for long lists (never ScrollView)
- Use React.memo for list items
- Minimize re-renders with useCallback
- Use Hermes engine (default in Expo)
- Avoid large images — use expo-image for caching