React Native + Expo
CLAUDE.md for React Native + Expo
Puntuación: AA CLAUDE.md covering the prebuild workflow, platform-fork conventions, and the native-dependency gotchas that break hot reload.
# CLAUDE.md - Trailhead (React Native + Expo) ## Commands ```bash npx expo start # dev; i = iOS simulator, a = Android pnpm test -- ComposeScreen # single suite (full run is slow, avoid while iterating) pnpm lint && pnpm typecheck # CI gates npx expo prebuild --clean # only after native config changes in app.json ``` ## Architecture - Expo Router: file-based screens under `app/`; shared layouts in `_layout.tsx`. - Server cache is TanStack Query (`hooks/queries/`); client state is Zustand (`stores/`). Query data never gets copied into a store. - Native configuration lives in `app.json` + config plugins; `ios/` and `android/` are generated by prebuild. ## Conventions - Platform differences via `.ios.tsx` / `.android.tsx` file forks. - Styles co-located with `StyleSheet.create`; theme tokens from `theme/` - no hardcoded colors. - New screens follow `app/(tabs)/profile.tsx` for data loading and error states. ## Workflow - After changing any dependency with native code: `npx expo prebuild --clean`, then a fresh dev build - hot reload will lie to you until then. - Test on both simulators before marking UI work done; Android text rendering differs enough to break layouts. ## Do not - Do not import Node-only modules; this runs on Hermes. - Do not hand-edit `ios/` or `android/`; they are regenerated output. - Do not store tokens in AsyncStorage; use `expo-secure-store`.
Estos ejemplos se publican bajo CC0: úsalos libremente, sin atribución. Se proveen tal cual, sin garantía de ningún tipo: revísalos y adáptalos a tu proyecto antes de usarlos, ya que eres responsable del resultado de aplicarlos.
Lleva PromptArch a tu equipo
Implementa PromptArch como herramienta interna en cada área de tu empresa. Obtén cuentas de equipo con créditos precargados compartidos y dominios personalizados para tu organización.
Contáctanos