React Native + Expo
AGENTS.md for React Native + Expo
Score: AAn AGENTS.md for an Expo Router app: EAS commands, Hermes constraints, prebuild rules, and query/store state separation.
# Trailhead (React Native + Expo) ## Project Overview Expo Router app, TypeScript strict, Hermes engine. State via Zustand, server cache via TanStack Query. EAS handles builds and store submission. ## Setup & Commands ```bash pnpm install npx expo start # dev server; press i / a for simulators pnpm test # Jest + React Native Testing Library pnpm test -- ComposeScreen # single suite pnpm lint && pnpm typecheck npx expo prebuild --clean # only when native config changes eas build --profile preview # internal distribution build ``` ## Structure - `app/` - screens via Expo Router file conventions; layouts in `_layout.tsx` - `components/` - shared UI; `hooks/` - shared logic; `stores/` - Zustand slices - Platform forks only via `.ios.tsx` / `.android.tsx` suffixes, never runtime `Platform.OS` branches in render code ## Code Style - Function components + hooks only; co-locate styles with `StyleSheet.create`. - Server state lives in TanStack Query; Zustand is for client-only state. Don't mirror query data into a store. - Navigation params are typed via the route's `useLocalSearchParams<T>()`. ## Testing - RNTL queries by role/text, not testID, except for lists. - Mock native modules in `jest.setup.ts`; a test that imports a native module directly will fail in CI even if it passes locally. ## Boundaries - Hermes runtime: no Node-only modules (fs, crypto, net) anywhere in `app/`. - No secrets in the bundle or app.json; use EAS secrets and `expo-constants`. - Never edit `ios/` or `android/` by hand - they are prebuild output; change `app.json` / config plugins instead. ## PR Guidelines - Screenshot or screen recording required for visual changes, both platforms. - Bumping any native dependency requires a new EAS build before merge.
These examples are released under CC0. Use them freely, no attribution required. They are provided as is, without warranty of any kind: review and adapt them to your project before use, as you are responsible for the outcome of applying them.
Bring PromptArch to your team
Deploy PromptArch as an internal tool across every area of your company. Get team accounts with shared preloaded credits and custom domains tailored to your organization.
Contact Us