PromptArchPromptArch.ai
React Native + Expo

AGENTS.md for React Native + Expo

Nota: A

An 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.

Estes exemplos são publicados sob CC0. Use livremente, sem atribuição. São fornecidos como estão, sem garantia de qualquer tipo: revise e adapte ao seu projeto antes de usar, pois você é responsável pelo resultado de aplicá-los.

Leve o PromptArch para sua equipe

Implemente o PromptArch como ferramenta interna em todas as áreas da sua empresa. Obtenha contas de equipe com créditos pré-carregados compartilhados e domínios personalizados para sua organização.

Fale Conosco
AGENTS.md for React Native + Expo - Example | PromptArch | PromptArch