React Native and Expo applications
Builds mobile features within the project's native generation, navigation and platform delivery workflow.
react-native-expo
See how it helpsWhen is it useful?
Use when adding a mobile feature that touches native configuration, routing or rendering performance.
What does it help you do?
- Detects generated versus maintained native projects and matches dependencies to the installed SDK.
- Keeps authentication and deep-link behavior deliberate across navigation paths.
- Distinguishes JavaScript updates from changes requiring a new native binary.
Try asking this
Add a camera entry flow using our Expo setup, including denied permission, deep links and a clear native-build requirement. Open the camera route from a cold-start link and deny permission. Preserve the intended destination and identify changes requiring a native rebuild rather than a JavaScript update.
Detailed documentation
Read the skill’s original instructions, examples and checks in their authored language.
Show less
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.
Included files 2
LICENSE.txtSKILL.md
About this skill package
react-native-expo
react-native-expo: Build mobile apps that handle navigation, native integrations, offline data and interrupted sessions reliably.
Show less
react-native-expo
react-native-expo: Build mobile apps that handle navigation, native integrations, offline data and interrupted sessions reliably.
Includes the complete skill and its supporting files (2 files). The exact authored scope is preserved below.
Original skill description (source language)
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.
Install the skill, review its source and trust settings, then enable it for the relevant project or agent.
Requirements
- Orqestria installed on your computer.
