React Native und Expo
Entwickelt mobile Funktionen innerhalb des vorhandenen nativen Generierungs-, Navigations- und Auslieferungsablaufs.
react-native-expo
Entdecke, wie der Skill hilftWann ist der Skill hilfreich?
Nutze diesen Skill bei nativen Einstellungen, Routen oder Darstellungsleistung.
Wobei hilft er dir?
- Erkennt generierte native Projekte und SDK-passende Abhängigkeiten.
- Gestaltet Anmeldung und Deep Links über Navigationswege hinweg.
- Trennt JavaScript-Updates von Änderungen mit neuem nativen Build.
Das könntest du fragen
Ergänze Kameraeinstieg in unserem Expo-Projekt mit abgelehnter Berechtigung, Deep Links und klarem Buildbedarf. Öffne die Kamera aus einem Kaltstart-Link und verweigere Zugriff. Erhalte das Ziel und benenne Änderungen, die einen nativen Neubuild statt JavaScript-Update benötigen.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
React Native & Expo
Build production React Native and Expo applications that follow the repository's native generation workflow, New Architecture conventions, navigation patterns and 60/120fps rendering discipline.
1. Workflow, Continuous Native Generation (CNG) and dependencies
- Detect the workflow first:
- Expo CNG (Prebuild):
ios/andandroid/are absent or generated fromapp.json/app.config.ts. Never hand-edit generatedios/orandroid/—apply permissions, entitlements, URL schemes and build properties viaapp.config.tsand config plugins (expo-build-properties). - Bare React Native:
ios/andandroid/are committed; keepPodfile,Info.plist,build.gradleandAndroidManifest.xmlin sync across both platforms.
- Expo CNG (Prebuild):
- SDK-aligned dependencies: in Expo apps, install packages with
npx expo install <pkg>so versions match the pinned SDK, then runnpx expo-doctor. - Binary vs OTA boundary (
runtimeVersion): any change to native dependencies, config plugins, permissions or native code requires a new native binary build and aruntimeVersionbump. Pure JS/TS/asset changes can ship via EAS Update. State which one your change needs.
2. Navigation: Expo Router & React Navigation
- Expo Router (
src/app/orapp/):- Use layouts (
_layout.tsx), route groups ((tabs),(auth)) and typed routes (experiments.typedRoutes: true). - Guard authenticated routes in
_layout.tsxwith<Stack.Protected guard={!!session} redirectTo="/sign-in">so unauthenticated users and sign-outs never access protected screens. - Sanitize incoming native deep links in
+native-intent.tsx(redirectSystemPath({ path, initial })), wrapping URL parsing intry/catchto redirect malformed links to a fallback route instead of crashing.
- Use layouts (
- React Navigation: define strict TypeScript param lists (
RootStackParamList), pass only serializable IDs/primitives in route params, and usenavigation.replace/CommonActions.resetafter login or checkout.
3. Rendering, lists, gestures and the New Architecture
- Virtualized lists: never render dynamic lists with
.map()inside aScrollView. UseFlashList/LegendListorFlatList/SectionListwith a stablekeyExtractor={(item) => item.id}, memoized row components (React.memo), stablerenderItem(useCallback),extraDatawhen rows depend on external state, andgetItemLayoutfor fixed heights. - UI-thread animations and gestures: run animations and gestures on the UI thread via
react-native-reanimated(useSharedValue,useAnimatedStyle, worklets) andreact-native-gesture-handler(Gesture.Pan(),GestureDetector), orAnimatedwithuseNativeDriver: true. Never runsetStateon every scroll/gesture frame. - Images: use
expo-imagewith explicit dimensions,contentFit,placeholder(blurhash/thumbhash) and disk/memory caching. - New Architecture (Fabric & TurboModules) + Hermes: avoid legacy bridge calls (
findNodeHandle); useonLayoutor synchronoususeLayoutEffectmeasurements supported by Fabric.
4. Storage, environment config and platform differences
- Storage tiers:
- Credentials & tokens ->
expo-secure-storeorreact-native-keychain. - Relational data / large caches ->
expo-sqlite(supportsuseSQLCipherconfig plugin andexpo-sqlite/kv-store) or WatermelonDB. - Fast non-sensitive preferences ->
react-native-mmkvorAsyncStorage.
- Credentials & tokens ->
- Environment variables:
EXPO_PUBLIC_*andConstants.expoConfig.extraare public in the JS bundle—never put private API keys or server secrets there. - Platform parity: account for iOS vs Android differences in shadows (
shadow*vselevation), keyboard avoidance (paddingon iOS vsheight/resize on Android), status bar contrast, and safe-area insets.
5. Testing & verification
- Test screens and hooks with Jest (
jest-expo) and React Native Testing Library (render,screen.getByRole,userEvent), mocking native modules at the service boundary. - Run
npx tsc --noEmit, ESLint andnpx expo-doctor.
Before you finish
- Expo CNG vs bare workflow respected; dependencies aligned with the SDK.
- Native binary rebuild vs OTA update impact (
runtimeVersion) stated. - Routes, auth guards (
Stack.Protected) and deep links handled safely. - Lists virtualized; animations on the UI thread;
tscand Jest/RNTL tests pass.
Enthaltene Dateien 2
LICENSE.txtSKILL.md
Über dieses Skill-Paket
react-native-expo
react-native-expo: Entwickelt mobile Apps, die Navigation, native Integrationen, Offline-Daten und unterbrochene Sitzungen zuverlässig behandeln.
Weniger anzeigen
react-native-expo
react-native-expo: Entwickelt mobile Apps, die Navigation, native Integrationen, Offline-Daten und unterbrochene Sitzungen zuverlässig behandeln.
Enthält den vollständigen Skill und seine Begleitdateien (2 Dateien). Der genaue, ursprünglich verfasste Anwendungsbereich bleibt unten erhalten.
Ursprüngliche Skill-Beschreibung (Quellsprache)
Use when working on a React Native or Expo app, EAS Build or EAS Update, Expo Router, React Navigation, FlatList/FlashList, New Architecture (Fabric/TurboModules), config plugins, Hermes, Metro bundler, Reanimated, Gesture Handler or React Native Testing Library.
Installiere den Skill, prüfe seine Quelle und Vertrauenseinstellungen und aktiviere ihn für das passende Projekt oder den Agenten.
Voraussetzungen
- Orqestria auf deinem Computer installiert.
