
React Native
Guide and review React Native + Expo mobile code for list performance, animations, navigation, and platform-specific patterns.
Overview
React Native is an agent skill for the Build phase that applies Expo and React Native performance and architecture patterns when you create or review mobile app code.
Install
npx skills add https://github.com/jezweb/claude-skills --skill react-nativeWhat is this skill?
- CRITICAL-first rule ranking for list scroll performance (FlatList/FlashList vs ScrollView)
- FlatList keyExtractor and virtualization patterns to cut unnecessary re-renders
- Reanimated and animation guidance for smooth mobile interactions
- Expo workflows including Expo Router and new-project setup
- Platform-specific iOS/Android patterns for production mobile apps
- Rules ranked by impact with CRITICAL list-performance patterns addressed before MEDIUM priorities
Adoption & trust: 867 installs on skills.sh; 841 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are building or shipping a React Native app and scroll jank, list misuse, or weak Expo structure is slowing you down or hurting UX.
Who is it for?
Indie builders using Claude Code on Expo or React Native apps who want checklist-driven performance fixes before adding features.
Skip if: Pure native Swift/Kotlin projects, backend-only work, or teams that already enforce a separate mobile architecture RFC with no agent involvement.
When should I use this skill?
Building new React Native or Expo apps, optimizing list and scroll performance, implementing animations, reviewing mobile code, or setting up a new Expo project; triggers include 'react native', 'expo', 'flatlist', 'rean
What do I get? / Deliverables
Your agent applies ranked mobile patterns—especially list virtualization and animation discipline—so new and reviewed screens follow performant Expo/React Native defaults.
- Performance-oriented RN/Expo implementation guidance
- Code review notes aligned to CRITICAL→MEDIUM pattern table
Recommended Skills
Journey fit
Canonical shelf is Build because the skill targets implementing and optimizing mobile app UI and architecture, not distribution or validation. Frontend subphase fits UI lists, Reanimated, Expo Router, and screen-level performance—the core of the documented patterns.
How it compares
Use as a mobile-specific pattern playbook during implementation and review, instead of generic React web guidance or ad-hoc stack overflow fixes.
Common Questions / FAQ
Who is react-native for?
Solo and indie developers building or maintaining React Native and Expo apps with an AI coding agent who need structured performance and architecture guidance.
When should I use react-native?
Use it in the Build phase when scaffolding a new Expo app, optimizing FlatList or FlashList scrolling, adding Reanimated animations, setting up Expo Router, or reviewing mobile code before ship.
Is react-native safe to install?
Review the Security Audits panel on this Prism page and the repo’s allowed-tools list; the skill permits read/write/edit and Bash on your project, so use it only in repos you trust the agent to modify.
SKILL.md
READMESKILL.md - React Native
# React Native Patterns Performance and architecture patterns for React Native + Expo apps. Rules ranked by impact — fix CRITICAL before touching MEDIUM. This is a starting point. The skill will grow as you build more mobile apps. ## When to Apply - Building new React Native or Expo apps - Optimising list and scroll performance - Implementing animations - Reviewing mobile code for performance issues - Setting up a new Expo project ## 1. List Performance (CRITICAL) Lists are the #1 performance issue in React Native. A janky scroll kills the entire app experience. | Pattern | Problem | Fix | |---------|---------|-----| | **ScrollView for data** | `<ScrollView>` renders all items at once | Use `<FlatList>` or `<FlashList>` — virtualised, only renders visible items | | **Missing keyExtractor** | FlatList without `keyExtractor` → unnecessary re-renders | `keyExtractor={(item) => item.id}` — stable unique key per item | | **Complex renderItem** | Expensive component in renderItem re-renders on every scroll | Wrap in `React.memo`, extract to separate component | | **Inline functions in renderItem** | `renderItem={({ item }) => <Row onPress={() => nav(item.id)} />}` | Extract handler: `const handlePress = useCallback(...)` | | **No getItemLayout** | FlatList measures every item on scroll (expensive) | Provide `getItemLayout` for fixed-height items: `(data, index) => ({ length: 80, offset: 80 * index, index })` | | **FlashList** | FlatList is good, FlashList is better for large lists | `@shopify/flash-list` — drop-in replacement, recycling architecture | | **Large images in lists** | Full-res images decoded on main thread | Use `expo-image` with placeholder + transition, specify dimensions | ### FlatList Checklist Every FlatList should have: ```tsx <FlatList data={items} keyExtractor={(item) => item.id} renderItem={renderItem} // Memoised component getItemLayout={getItemLayout} // If items are fixed height initialNumToRender={10} // Don't render 100 items on mount maxToRenderPerBatch={10} // Batch size for off-screen rendering windowSize={5} // How many screens to keep in memory removeClippedSubviews={true} // Unmount off-screen items (Android) /> ``` ## 2. Animations (HIGH) Native animations run on the UI thread. JS animations block the JS thread and cause jank. | Pattern | Problem | Fix | |---------|---------|-----| | **Animated API for complex animations** | `Animated` runs on JS thread, blocks interactions | Use `react-native-reanimated` — runs on UI thread | | **Layout animation** | Item appears/disappears with no transition | `LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)` | | **Shared element transitions** | Navigate between screens, element teleports | `react-native-reanimated` shared transitions or `expo-router` shared elements | | **Gesture + animation** | Drag/swipe feels laggy | `react-native-gesture-handler` + `reanimated` worklets — all on UI thread | | **Measuring layout** | `onLayout` fires too late, causes flash | Use `useAnimatedStyle` with shared values for instant response | ### Reanimated Basics ```tsx import Animated, { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated'; function AnimatedBox() { const offset = useSharedValue(0); const style = useAnimatedStyle(() => ({ transform: [{ translateX: withSpring(offset.va