React Native logo

React Native

CommunityPopular
jezweb
react-native

React Native and Expo patterns for building performant mobile apps. Covers list performance, animations with Reanimated, navigation, UI patterns, state management, platform-specific code, and Expo workflows. Use when building or reviewing React Native code. Triggers: 'react native', 'expo', 'mobile app', 'react native performance', 'flatlist', 'reanimated', 'expo router', 'mobile development', 'ios app', 'android app'.

Overview

Publisherjezweb
Repositoryclaude-skills
Skill namereact-native
Stars
1K
Forks
102
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by jezweb on GitHub. Read the source before you install it.

Installation

Install the React Native AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jezweb/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/plugins/frontend/skills/react-native .claude/skills/react-native
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable React Native in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads React Native on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so React Native is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

PatternProblemFix
ScrollView for data<ScrollView> renders all items at onceUse <FlatList> or <FlashList> — virtualised, only renders visible items
Missing keyExtractorFlatList without keyExtractor → unnecessary re-renderskeyExtractor={(item) => item.id} — stable unique key per item
Complex renderItemExpensive component in renderItem re-renders on every scrollWrap in React.memo, extract to separate component
Inline functions in renderItemrenderItem={({ item }) => <Row onPress={() => nav(item.id)} />}Extract handler: const handlePress = useCallback(...)
No getItemLayoutFlatList measures every item on scroll (expensive)Provide getItemLayout for fixed-height items: (data, index) => ({ length: 80, offset: 80 * index, index })
FlashListFlatList is good, FlashList is better for large lists@shopify/flash-list — drop-in replacement, recycling architecture
Large images in listsFull-res images decoded on main threadUse 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.

PatternProblemFix
Animated API for complex animationsAnimated runs on JS thread, blocks interactionsUse react-native-reanimated — runs on UI thread
Layout animationItem appears/disappears with no transitionLayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)
Shared element transitionsNavigate between screens, element teleportsreact-native-reanimated shared transitions or expo-router shared elements
Gesture + animationDrag/swipe feels laggyreact-native-gesture-handler + reanimated worklets — all on UI thread
Measuring layoutonLayout fires too late, causes flashUse 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.value) }],
  }));

  return (
    <GestureDetector gesture={panGesture}>
      <Animated.View style={[styles.box, style]} />
    </GestureDetector>
  );
}

3. Navigation (HIGH)

PatternProblemFix
Expo RouterFile-based routing (like Next.js) for React Nativeapp/ directory with _layout.tsx files. Preferred for new Expo projects.
Heavy screens on stackEvery screen stays mounted in the stackUse unmountOnBlur: true for screens that don't need to persist
Deep linkingApp doesn't respond to URLsExpo Router handles this automatically. For bare RN: Linking API config
Tab badge updatesBadge count doesn't update when tab is focusedUse useIsFocused() or refetch on focus: useFocusEffect(useCallback(...))
Navigation state persistenceApp loses position on background/killonStateChange + initialState with AsyncStorage

Expo Router Structure

app/
├── _layout.tsx          # Root layout (tab navigator)
├── index.tsx            # Home tab
├── (tabs)/
│   ├── _layout.tsx      # Tab bar config
│   ├── home.tsx
│   ├── search.tsx
│   └── profile.tsx
├── [id].tsx             # Dynamic route
└── modal.tsx            # Modal route

4. UI Patterns (HIGH)

PatternProblemFix
Safe areaContent under notch or home indicator<SafeAreaView> or useSafeAreaInsets() from react-native-safe-area-context
Keyboard avoidanceForm fields hidden behind keyboard<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'}>
Platform-specific codeiOS and Android need different behaviourPlatform.select({ ios: ..., android: ... }) or .ios.tsx / .android.tsx files
Status barStatus bar overlaps content or wrong colour<StatusBar style="auto" /> from expo-status-bar in root layout
Touch targetsButtons too small to tapMinimum 44x44pt. Use hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
Haptic feedbackTaps feel deadexpo-hapticsHaptics.impactAsync(Haptics.ImpactFeedbackStyle.Light) on important actions

5. Images and Media (MEDIUM)

PatternProblemFix
Image component<Image> from react-native is basicUse expo-image — caching, placeholder, transition, blurhash
Remote images without dimensionsLayout shift when image loadsAlways specify width and height, or use aspectRatio
Large imagesOOM crashes on AndroidResize server-side or use expo-image which handles memory
SVGSVG support isn't nativereact-native-svg + react-native-svg-transformer for SVG imports
VideoVideo playbackexpo-av or expo-video (newer API)

6. State and Data (MEDIUM)

PatternProblemFix
AsyncStorage for complex dataJSON parse/stringify on every readUse MMKV (react-native-mmkv) — 30x faster than AsyncStorage
Global stateRedux/MobX boilerplate for simple stateZustand — minimal, works great with React Native
Server stateManual fetch + loading + error + cacheTanStack Query — same as web, works in React Native
Offline firstApp unusable without networkTanStack Query persistQueryClient + MMKV, or WatermelonDB for complex offline
Deep state updatesSpread operator hell for nested objectsImmer via Zustand: set(produce(state => { state.user.name = 'new' }))

7. Expo Workflow (MEDIUM)

PatternWhenHow
Development buildNeed native modulesnpx expo run:ios or eas build --profile development
Expo GoQuick prototyping, no native modulesnpx expo start — scan QR code
EAS BuildCI/CD, app store buildseas build --platform ios --profile production
EAS UpdateHot fix without app store revieweas update --branch production --message "Fix bug"
Config pluginsModify native config without ejectingapp.config.ts with expo-build-properties or custom config plugin
Environment variablesDifferent configs per buildeas.json build profiles + expo-constants

New Project Setup

bash
npx create-expo-app my-app --template tabs
cd my-app
npx expo install expo-image react-native-reanimated react-native-gesture-handler react-native-safe-area-context

8. Testing (LOW-MEDIUM)

ToolForSetup
JestUnit tests, hook testsIncluded with Expo by default
React Native Testing LibraryComponent tests@testing-library/react-native
DetoxE2E tests on real devices/simulatorsdetox — Wix's testing framework
MaestroE2E with YAML flowsmaestro test flow.yaml — simpler than Detox

Common Gotchas

GotchaFix
Metro bundler cachenpx expo start --clear
Pod install issues (iOS)cd ios && pod install --repo-update
Reanimated not workingMust be first import: import 'react-native-reanimated' in root
Expo SDK upgradenpx expo install --fix after updating SDK version
Android build failsCheck gradle.properties for memory: org.gradle.jvmargs=-Xmx4g
iOS simulator slowUse physical device for performance testing — simulator doesn't reflect real perf

Frequently asked questions

What does the React Native AI skill do?

React Native and Expo patterns for building performant mobile apps. Covers list performance, animations with Reanimated, navigation, UI patterns, state management, platform-specific code, and Expo workflows. Use when building or reviewing React Native code. Triggers: 'react native', 'expo', 'mobile app', 'react native performance', 'flatlist', 'reanimated', 'expo router', 'mobile development', 'ios app', 'android app'.

Why use React Native on TypingMind?

Because you install it once and use it with any model. React Native is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install React Native in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jezweb/claude-skills/tree/main/plugins/frontend/skills/react-native. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use React Native?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with React Native?

As many as you like. As long as a model supports skills, you can use React Native with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the React Native AI skill free?

Yes. It is published on GitHub by jezweb under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇