React native

From j4flmao/agent-skills · View interactive version

React native is an AI agent skill from the GitHub repository j4flmao/agent-skills. Use when the user asks about React Native, an Expo app, Expo Router, React Navigation, FlashList or FlatList performance, Reanimated, EAS Build, EAS Update/OTA updates or RN upgrades. Produces React Native app code, navigation, performance fixes and release setup. Not for JSI/Fabric/TurboModule inte

How to use this skill

Skill file

React Native

Purpose

React Native renders native views from React components. Since 0.76 the New Architecture is the default and since 0.82 it is the only runtime, so current libraries, performance techniques and upgrade paths assume it. This skill covers the production defaults: Expo-based tooling, navigation, fast lists and animations, native modules, OTA updates and release discipline.

Agent Protocol

Trigger

"React Native", "Expo", "FlatList performance", "FlashList", "Reanimated", "React Navigation", "Expo Router", "EAS Build", "EAS Update", "OTA update", "CodePush", "Hermes", "native module", "Turbo Module", "RN upgrade".

Input Context

Output Artifact

TypeScript/TSX code, config (app.json/app.config.ts, eas.json), or an upgrade/performance plan. No file unless requested.

Response Format

RN/Expo: {0.8x / SDK xx}  Arch: New Architecture
Area: {navigation | lists | animation | native module | OTA | release}
Change: {what and why}
Code: {snippet}
Verify: {profiler / test / device check}

1. Project Setup

2. Navigation

3. Lists

import { FlatList, Text, View } from 'react-native';
import { memo, useCallback } from 'react';

const ITEM_HEIGHT = 56;
const Row = memo(function Row({ title }: { title: string }) {
  return <View style={{ height: ITEM_HEIGHT, justifyContent: 'center' }}><Text>{title}</Text></View>;
});

export function OrderList({ data }: { data: { id: string; title: string }[] }) {
  const renderItem = useCallback(({ item }: { item: { id: string; title: string } }) => <Row title={item.title} />, []);
  const getItemLayout = useCallback((_: unknown, index: number) =>
    ({ length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index }), []);
  return (
    <FlatList
      data={data}
      keyExtractor={(item) => item.id}
      renderItem={renderItem}
      getItemLayout={getItemLayout}      // only valid for fixed-height rows
      initialNumToRender={12}
      windowSize={7}
    />
  );
}

4. Animations and Gestures

5. Performance Workflow

  1. Reproduce in a release build on a low-end Android device.
  2. React Native DevTools (0.76+; Flipper is no longer the default) — React Profiler for re-renders, JS profiler for hot functions.
  3. Fix re-render cascades (memoisation, state colocation, selector-based stores like Zustand/Redux Toolkit selectors), long JS tasks (move to native or chunk work), image sizes, and startup (lazy-load screens, reduce bundle, avoid synchronous storage reads at launch).
  4. Native profilers (Xcode Instruments, Android Studio profiler/Perfetto) for UI-thread and memory issues.

6. Native Modules

7. OTA Updates

8. Testing and Release

9. Anti-Patterns

| Anti-pattern | Problem | Fix |

|--------------|---------|-----|

| ScrollView with hundreds of children | memory, slow mount | FlatList/FlashList |

| Inline functions/objects passed to memoised rows | breaks memoisation | useCallback/useMemo, stable props |

| Animations via setState per frame | JS-thread jank | Reanimated worklets |

| Libraries without New Architecture support | build failures on 0.82+ | replace or contribute support |

| OTA update without runtimeVersion gating | crashes on old binaries | runtimeVersion policy + staged rollout |

| Secrets in JS bundle / app.json | extractable | server-side, secure storage for tokens |

10. Checklist

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.