React Native / Expo Stack Conventions
Architecture
- Expo managed workflow (SDK 52+). Expo Router for file-based navigation.
- App directory structure mirrors Expo Router conventions (app/ directory).
- TypeScript strict mode. No
any.
Components
- Functional components only. Custom hooks for shared logic.
- StyleSheet.create for all styles. No inline style objects in JSX.
- Platform-specific code:
.ios.tsx/.android.tsxsuffixes orPlatform.select(). - Use
FlatList/FlashListfor lists. NeverScrollViewwith.map()for dynamic lists.
Navigation (Expo Router)
- File-based routing in app/ directory.
- Layouts:
_layout.tsxfor shared navigation structure. - Typed routes with
expo-router'sLinkcomponent.
Native APIs
expo-imageoverImagefor performance.expo-secure-storefor sensitive data.expo-notificationsfor push notifications.- Check platform support before using any native module.
State Management
- React Query / TanStack Query for server state.
- Zustand for client state.
- No Redux unless PRD explicitly requires it.
Testing
- Jest + React Native Testing Library.
- Mock native modules in jest.setup.ts.
- Test user interactions (press, type, scroll), not implementation.
Source: phalconVee/devstart — distributed by TomeVault.