jpskill.com
🛠️ 開発・MCP コミュニティ

react-native-dev

React Native and Expo development guide covering components, styling, animations, navigation, state management, forms, networking, performance optimization, testing, native capabilities, and engineering (project structure, deployment, SDK upgrades, CI/CD). Use when: building React Native or Expo apps, implementing animations or native UI, managing state, fetching data, writing tests, optimizing performance, deploying to App Store/Play Store, setting up CI/CD, upgrading Expo SDK, or configuring Tailwind/NativeWind.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o react-native-dev.zip https://jpskill.com/download/19709.zip && unzip -o react-native-dev.zip && rm react-native-dev.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19709.zip -OutFile "$d\react-native-dev.zip"; Expand-Archive "$d\react-native-dev.zip" -DestinationPath $d -Force; ri "$d\react-native-dev.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して react-native-dev.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → react-native-dev フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
12

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

React Native & Expo 開発ガイド

本番環境に対応した React Native および Expo アプリケーションを構築するための実践的なガイドです。UI、アニメーション、状態管理、テスト、パフォーマンス、デプロイメントについて説明します。

リファレンス

必要に応じて、以下のリソースを参照してください。

  • references/navigation.md — Expo Router: Stack、Tabs、NativeTabs (headerLargeTitleheaderBackButtonDisplayMode)、リンク、モーダル、シート、コンテキストメニュー
  • references/components.md — FlashList パターン、expo-image、セーフエリア (contentInsetAdjustmentBehavior)、ネイティブコントロール、ぼかし/ガラス効果、ストレージ
  • references/styling.md — StyleSheet、NativeWind/Tailwind、プラットフォームスタイル、テーマ設定、ダークモード
  • references/animations.md — Reanimated 3: entering/exiting、共有値、ジェスチャー、スクロール駆動
  • references/state-management.md — Zustand (セレクター、永続化)、Jotai (アトム、派生)、React Query、Context
  • references/forms.md — React Hook Form + Zod: バリデーション、マルチステップ、動的配列
  • references/networking.md — fetch ラッパー、React Query (楽観的更新)、認証トークン、オフライン、API ルート、Webhook
  • references/performance.md — プロファイリングワークフロー、FlashList + memo、バンドル分析、TTI、メモリリーク、アニメーションパフォーマンス
  • references/testing.md — Jest、React Native Testing Library、Maestro を使用した E2E
  • references/native-capabilities.md — カメラ、位置情報、パーミッション (use*Permissions フック)、ハプティクス、通知、生体認証
  • references/engineering.md — プロジェクトレイアウト (components/ui/stores/services/)、パスエイリアス、SDK アップグレード、EAS build/submit、CI/CD、DOM コンポーネント

クイックリファレンス

コンポーネントの推奨事項

目的 使用 代わりに
リスト FlashList (@shopify/flash-list) + memo アイテム FlatList (ビューのリサイクルなし)
画像 expo-image RN <Image> (キャッシュなし、WebP なし)
プレス Pressable TouchableOpacity (レガシー)
オーディオ expo-audio expo-av (非推奨)
ビデオ expo-video expo-av (非推奨)
アニメーション Reanimated 3 RN Animated API (制限あり)
ジェスチャー Gesture Handler PanResponder (レガシー)
プラットフォームチェック process.env.EXPO_OS Platform.OS
コンテキスト React.use() React.useContext() (React 18)
セーフエリアスクロール contentInsetAdjustmentBehavior="automatic" <SafeAreaView>
SF Symbols expo-image with source="sf:name" expo-symbols

スケーリングアップ

状況 検討事項
スクロールがカクつく長いリスト 仮想化リストライブラリ (例: FlashList)
Tailwind スタイルのクラスが必要 NativeWind v4
高頻度なストレージ読み取り 同期ベースのストレージ (例: MMKV)
Expo を使用した新規プロジェクト bare React Navigation よりも Expo Router

状態管理

状態の種類 ソリューション
ローカル UI 状態 useState / useReducer
共有アプリ状態 Zustand または Jotai
サーバー / 非同期データ React Query
フォーム状態 React Hook Form + Zod

パフォーマンスの優先順位

優先度 問題 修正
CRITICAL 長いリストのカクつき FlashList + メモ化されたアイテム
CRITICAL 大きなバンドル バレルインポートを避ける、R8 を有効にする
HIGH 再レンダリングが多すぎる Zustand セレクター、React Compiler
HIGH 起動が遅い バンドル圧縮を無効にする、ネイティブナビゲーション
MEDIUM アニメーションのドロップ transform/opacity のみアニメーション化

新規プロジェクトの初期化

# 1. プロジェクトを作成
npx create-expo-app@latest my-app --template blank-typescript
cd my-app

# 2. Expo Router + コア依存関係をインストール
npx expo install expo-router react-native-safe-area-context react-native-screens

# 3. (オプション) 一般的な追加機能
npx expo install expo-image react-native-reanimated react-native-gesture-handler

次に、以下を設定します。

  1. package.json でエントリポイントを設定: "main": "expo-router/entry"
  2. app.json でスキームを追加: "scheme": "my-app"
  3. App.tsxindex.ts を削除
  4. ルート Stack レイアウトとして app/_layout.tsx を作成
  5. タブナビゲーション用に app/(tabs)/_layout.tsx を作成
  6. app/(tabs)/ にルートファイルを作成 (詳細は navigation.md を参照)

Web サポートのためには、npx expo install react-native-web react-dom @expo/metro-runtime もインストールしてください。

コア原則

記述する前にリファレンスを参照する: ナビゲーション、リスト、ネットワーク、プロジェクト設定を実装する際は、上記の該当するリファレンスファイルを読んで、パターンと落とし穴を確認してください。

まず Expo Go を試す (npx expo start)。カスタムビルド (eas build) は、ローカルの Expo モジュール、Apple ターゲット、または Expo Go にないサードパーティのネイティブモジュールを使用する場合にのみ必要です。

条件付きレンダリング: {count > 0 && <Text />} を使用し、{count && <Text />} は使用しないでください (これは "0" をレンダリングします)。

アニメーションのルール: transformopacity のみアニメーション化してください — GPU で合成され、レイアウトのスラッシングが発生しません。

インポート: 常にソースから直接インポートし、バレルファイルからはインポートしないでください — バンドルの肥大化を避けます。

リストと画像: FlatList または RN Image を使用する前に、上記のコンポーネントの推奨事項テーブルを確認してください — FlashListexpo-image がほとんどの場合、適切な選択肢です。

ルートファイル: 常に kebab-case を使用し、app/ にコンポーネント/型/ユーティリティを併置しないでください。

チェックリスト

新規プロジェクトのセットアップ

  • [ ] tsconfig.json のパスエイリアスが設定されている
  • [ ] EXPO_PUBLIC_API_URL 環境変数が環境ごとに設定されている
  • [ ] ルートレイアウトに GestureHandlerRootView がある (ジェスチャーを使用する場合)
  • [ ] すべてのスクロールビューに contentInsetAdjustmentBehavior="automatic" が設定されている
  • [ ] 20 アイテムを超えるリストには FlatList の代わりに FlashList が使用されている

リリース前

  • [ ] --profile モードでプロファイリングし、16ms を超えるフレームを修正
  • [ ] バンドルが分析され (source-map-explorer)、バレルインポートがない
  • [ ] Android で R8 が有効になっている
  • [ ] 重要なパスの単体テスト + コンポーネントテスト
  • [ ] ログイン、コア機能、チェックアウトの E2E フロー

Flutte

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

React Native & Expo Development Guide

A practical guide for building production-ready React Native and Expo applications. Covers UI, animations, state, testing, performance, and deployment.

References

Consult these resources as needed:

Quick Reference

Component Preferences

Purpose Use Instead of
Lists FlashList (@shopify/flash-list) + memo items FlatList (no view recycling)
Images expo-image RN <Image> (no cache, no WebP)
Press Pressable TouchableOpacity (legacy)
Audio expo-audio expo-av (deprecated)
Video expo-video expo-av (deprecated)
Animations Reanimated 3 RN Animated API (limited)
Gestures Gesture Handler PanResponder (legacy)
Platform check process.env.EXPO_OS Platform.OS
Context React.use() React.useContext() (React 18)
Safe area scroll contentInsetAdjustmentBehavior="automatic" <SafeAreaView>
SF Symbols expo-image with source="sf:name" expo-symbols

Scaling Up

Situation Consider
Long lists with scroll jank Virtualized list libraries (e.g. FlashList)
Want Tailwind-style classes NativeWind v4
High-frequency storage reads Sync-based storage (e.g. MMKV)
New project with Expo Expo Router over bare React Navigation

State Management

State Type Solution
Local UI state useState / useReducer
Shared app state Zustand or Jotai
Server / async data React Query
Form state React Hook Form + Zod

Performance Priorities

Priority Issue Fix
CRITICAL Long list jank FlashList + memoized items
CRITICAL Large bundle Avoid barrel imports, enable R8
HIGH Too many re-renders Zustand selectors, React Compiler
HIGH Slow startup Disable bundle compression, native nav
MEDIUM Animation drops Only animate transform/opacity

New Project Init

# 1. Create project
npx create-expo-app@latest my-app --template blank-typescript
cd my-app

# 2. Install Expo Router + core deps
npx expo install expo-router react-native-safe-area-context react-native-screens

# 3. (Optional) Common extras
npx expo install expo-image react-native-reanimated react-native-gesture-handler

Then configure:

  1. Set entry point in package.json: "main": "expo-router/entry"
  2. Add scheme in app.json: "scheme": "my-app"
  3. Delete App.tsx and index.ts
  4. Create app/_layout.tsx as root Stack layout
  5. Create app/(tabs)/_layout.tsx for tab navigation
  6. Create route files in app/(tabs)/ (see navigation.md)

For web support, also install: npx expo install react-native-web react-dom @expo/metro-runtime

Core Principles

Consult references before writing: when implementing navigation, lists, networking, or project setup, read the matching reference file above for patterns and pitfalls.

Try Expo Go first (npx expo start). Custom builds (eas build) only needed when using local Expo modules, Apple targets, or third-party native modules not in Expo Go.

Conditional rendering: use {count > 0 && <Text />} not {count && <Text />} (renders "0").

Animation rule: only animate transform and opacity — GPU-composited, no layout thrash.

Imports: always import directly from source, not barrel files — avoids bundle bloat.

Lists and images: before using FlatList or RN Image, check the Component Preferences table above — FlashList and expo-image are almost always the right choice.

Route files: always use kebab-case, never co-locate components/types/utils in app/.

Checklist

New Project Setup

  • [ ] tsconfig.json path aliases configured
  • [ ] EXPO_PUBLIC_API_URL env var set per environment
  • [ ] Root layout has GestureHandlerRootView (if using gestures)
  • [ ] contentInsetAdjustmentBehavior="automatic" on all scroll views
  • [ ] FlashList instead of FlatList for lists > 20 items

Before Shipping

  • [ ] Profile in --profile mode, fix frames > 16ms
  • [ ] Bundle analyzed (source-map-explorer), no barrel imports
  • [ ] R8 enabled for Android
  • [ ] Unit + component tests for critical paths
  • [ ] E2E flows for login, core feature, checkout

Flutter development → see flutter-dev skill. iOS native (UIKit/SwiftUI) → see ios-application-dev skill. Android native (Kotlin/Compose) → see android-native-dev skill.

React Native is a trademark of Meta Platforms, Inc. Expo is a trademark of 650 Industries, Inc. All other product names are trademarks of their respective owners.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。