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

mobile-framework-react-native

React Nativeの新しいアーキテクチャやコンポーネント設計、React Navigation 7+、FlashList v2最適化、Reanimated 4でのジェスチャーなど、最新技術を活用したモバイルアプリ開発を効率的に行うSkill。

📜 元の英語説明(参考)

React Native mobile development patterns - New Architecture (Fabric, TurboModules, JSI), component architecture, React Navigation 7+, FlashList v2 optimization, gestures with Reanimated 4, platform-specific code, React 19 features

🇯🇵 日本人クリエイター向け解説

一言でいうと

React Nativeの新しいアーキテクチャやコンポーネント設計、React Navigation 7+、FlashList v2最適化、Reanimated 4でのジェスチャーなど、最新技術を活用したモバイルアプリ開発を効率的に行うSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

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

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

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

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

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して mobile-framework-react-native.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → mobile-framework-react-native フォルダができる
  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
同梱ファイル
1

📖 Skill本文(日本語訳)

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

React Native 開発パターン

クイックガイド: React Native の新しいアーキテクチャ (0.76 以降はデフォルト) でクロスプラットフォームのモバイルアプリを構築します。パフォーマンスの高いリストには FlashList を使用します (または、適切に最適化された FlatList を使用します)。静的または動的な API で型安全なナビゲーションフックを使用します。コンポーネントを小さく保ち、リストに渡されるコールバックをメモ化し、最初の日から両方のプラットフォームでテストします。


<critical_requirements>

重要: この Skill を使用する前に

すべてのコードは CLAUDE.md のプロジェクト規約に従う必要があります (kebab-case、名前付きエクスポート、インポート順序、import type、名前付き定数)

(20 個以上の項目を持つリストには、必ず FlashList (推奨) または FlatList を使用してください - 長いリストには .map() を使用した ScrollView は絶対に使用しないでください)

(必ず renderItem コールバックをメモ化し、安定した keyExtractor 関数を使用してください - FlashList 項目の key プロパティはリサイクルを壊すため避けてください)

(セーフエリアには必ず react-native-safe-area-context を使用してください - React Native に組み込まれている SafeAreaView は 0.81 以降で非推奨となり、削除されます)

(最初の日から必ず iOS と Android の両方でテストしてください - プラットフォームの違いがバグの原因となります)

(プラットフォームの違いには必ず Platform.select() またはプラットフォーム固有のファイルを使用してください - シャドウ、フォント、フィードバックが異なります)

(React Native 0.76 以降、新しいアーキテクチャがデフォルトで有効になっていることに注意してください - FabricTurboModules、およびブリッジレスモード)

</critical_requirements>


自動検出: React Native, react-native, React Navigation, @react-navigation, StyleSheet, FlatList, FlashList, ScrollView, View, Text, Pressable, TouchableOpacity, Platform.OS, Platform.select, SafeAreaView, KeyboardAvoidingView, Reanimated, Gesture Handler, TurboModules, Fabric, JSI, New Architecture

使用する場面:

  • クロスプラットフォームの iOS および Android モバイルアプリケーションの構築
  • React パターンを使用したネイティブモバイル UI の作成
  • スタック、タブ、またはドロワーパターンを使用したモバイルナビゲーションの実装
  • FlashList/FlatList と仮想化によるリストパフォーマンスの最適化
  • Reanimated 4 を使用したジェスチャーとアニメーションの追加
  • iOS と Android の違いに対するプラットフォーム固有のコードの処理
  • React Native の新しいアーキテクチャ (FabricTurboModulesJSI) の操作

カバーする主要なパターン:

  • 新しいアーキテクチャの基礎 (FabricTurboModulesJSI、ブリッジレスモード)
  • アクセシビリティプロパティとプラットフォーム固有のパターンを備えたコンポーネントアーキテクチャ
  • 型安全なフック、静的 API、および認証フローを備えた React Navigation 7+
  • メモ化とセルリサイクルによる FlashList/FlatList の最適化
  • Platform.select とファイル拡張子を使用したプラットフォーム固有のコード
  • セーフエリアとキーボードの処理
  • React 19 の機能 (React Native 0.78 以降): useOptimisticuse、props としての ref

使用しない場面:

  • Web のみの React アプリケーション (標準の React パターンを使用)
  • React Native Web ハイブリッドアプリ (追加の考慮事項が必要)
  • Flutter、Swift、または Kotlin ネイティブ開発

詳細なリソース:

  • examples/core.md - コンポーネントアーキテクチャ、複合コンポーネント
  • examples/navigation.md - 型安全なナビゲーション、認証フロー、ディープリンク
  • examples/styling.md - StyleSheet、デザイントークン、テーマ、レスポンシブスタイリング
  • examples/performance.md - FlashListFlatList の最適化、メモ化
  • reference.md - 意思決定フレームワーク、チェックリスト、CLI コマンド

<philosophy>

哲学

React Native を使用すると、React パターンを使用してネイティブモバイルアプリを構築できます。重要な洞察は、モバイルには Web とは異なる制約があるということです。パフォーマンスがより重要であり、プラットフォームの規約が異なり、ユーザーはネイティブな感触を期待します。

コア原則:

  1. 新しいアーキテクチャを優先 - React Native 0.76 以降では、新しいアーキテクチャがデフォルトで使用されます (FabricTurboModulesJSI、ブリッジレスモード)
  2. プラットフォームファーストの思考 - iOS と Android には異なる UX 規約があります (触覚、リップル、ナビゲーションパターン)
  3. デフォルトでパフォーマンスを重視 - モバイルデバイスは制約があります。FlashList/FlatList を使用し、コールバックをメモ化し、インラインスタイルを避けてください
  4. ネイティブな感触が重要 - ネイティブコンポーネント、適切なキーボード処理、セーフエリアインセットを使用してください
  5. 型安全はバグを防ぐ - ナビゲーションパラメータ、props、およびネイティブモジュールインターフェースを型付けします
  6. 両方のプラットフォームを早期にテスト - プラットフォームのバグは時間とともに悪化します。毎日両方でテストしてください

新しいアーキテクチャ (React Native 0.76 以降):

新しいアーキテクチャは、レガシーブリッジを削除し、以下を提供します。

  • Fabric - 同期レイアウト効果を備えた最新のレンダリングエンジン
  • TurboModules - 型安全なインターフェースを備えた遅延ロードされるネイティブモジュール
  • JSI (JavaScript Interface) - シリアライズなしの直接的な同期 JS からネイティブへの呼び出し
  • ブリッジレスモード - パフォーマンス向上のために非同期ブリッジを完全に削除

新しいアーキテクチャによるパフォーマンスの向上: アプリの起動が約 15ms 高速化 (約 8% の改善)、アプリのサイズが約 3.8MB 縮小 (20% の削減)、Metro リゾルバーが約 15 倍高速化、ウォームビルドが約 4 倍高速化。

メンタルモデル:

React Native は「一度書けば、どこでも実行できる」のではありません。「一度学べば、どこでも書ける」のです。プラットフォーム固有のコードをいくつか書くことを想定してください。共有コードベースは通常 80 ~ 95% であり、100% ではありません。

</philosophy>


<patterns>

コアパターン

パターン 1: コンポーネントアーキテクチャ

TypeScript、アクセシビリティプロパティ、およびプラットフォーム認識を使用してコンポーネントを構築します。主な懸念事項: TouchableOpacity よりも Pressable を使用し、accessibilityRole/accessibilityState を含め、E2E テストに testID を使用し、useMemo でスタイルをメモ化します。

// 主要なパターン: アクセシビリティ + testID + メモ化されたスタイル
<Pressable
  ref={ref}
  style={buttonStyle}
  onPress={handlePress}
  disabled={disabled}
  testID={testID}
  accessibilityRole="button"
  accessibilityState={{ disabled }}
>
  <Text style={styles.text}>{children}</Text>
</Pressable>

良い理由: スクリーンリーダー用の accessibilityRole/State、E2E 用の testID、Pressable は TouchableOpacity とは異なり android_ripple をサポートします

forwardRef、バリアントを備えた完全なコンポーネントについては、examples/core.md を参照してください。

(原文はここで切り詰められています)

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

React Native Development Patterns

Quick Guide: Build cross-platform mobile apps with React Native's New Architecture (default since 0.76). Use FlashList for performant lists (or FlatList with proper optimization). Use type-safe navigation hooks with static or dynamic API. Keep components small, memoize callbacks passed to lists, and test on both platforms from day one.


<critical_requirements>

CRITICAL: Before Using This Skill

All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering, import type, named constants)

(You MUST use FlashList (preferred) or FlatList for lists with more than 20 items - NEVER ScrollView with .map() for long lists)

(You MUST memoize renderItem callbacks and use stable keyExtractor functions - avoid key props on FlashList items as it breaks recycling)

(You MUST use react-native-safe-area-context for safe areas - React Native's built-in SafeAreaView is deprecated in 0.81+ and will be removed)

(You MUST test on BOTH iOS AND Android from day one - platform differences cause bugs)

(You MUST use Platform.select() or platform-specific files for platform differences - shadows, fonts, and feedback differ)

(You MUST be aware the New Architecture is enabled by default since React Native 0.76 - Fabric, TurboModules, and bridgeless mode)

</critical_requirements>


Auto-detection: React Native, react-native, React Navigation, @react-navigation, StyleSheet, FlatList, FlashList, ScrollView, View, Text, Pressable, TouchableOpacity, Platform.OS, Platform.select, SafeAreaView, KeyboardAvoidingView, Reanimated, Gesture Handler, TurboModules, Fabric, JSI, New Architecture

When to use:

  • Building cross-platform iOS and Android mobile applications
  • Creating native mobile UIs with React patterns
  • Implementing mobile navigation with stack, tab, or drawer patterns
  • Optimizing list performance with FlashList/FlatList and virtualization
  • Adding gestures and animations with Reanimated 4
  • Handling platform-specific code for iOS vs Android differences
  • Working with React Native's New Architecture (Fabric, TurboModules, JSI)

Key patterns covered:

  • New Architecture fundamentals (Fabric, TurboModules, JSI, bridgeless mode)
  • Component architecture with accessibility props and platform-specific patterns
  • React Navigation 7+ with type-safe hooks, static API, and auth flows
  • FlashList/FlatList optimization with memoization and cell recycling
  • Platform-specific code with Platform.select and file extensions
  • Safe area and keyboard handling
  • React 19 features (React Native 0.78+): useOptimistic, use, ref as props

When NOT to use:

  • Web-only React applications (use standard React patterns)
  • React Native Web hybrid apps (requires additional considerations)
  • Flutter, Swift, or Kotlin native development

Detailed Resources:


<philosophy>

Philosophy

React Native enables building native mobile apps using React patterns. The key insight is that mobile has different constraints than web: performance matters more, platform conventions differ, and users expect native feel.

Core principles:

  1. New Architecture first - React Native 0.76+ uses the New Architecture by default (Fabric, TurboModules, JSI, bridgeless mode)
  2. Platform-first thinking - iOS and Android have different UX conventions (haptics, ripples, navigation patterns)
  3. Performance by default - Mobile devices are constrained; use FlashList/FlatList, memoize callbacks, avoid inline styles
  4. Native feel matters - Use native components, proper keyboard handling, safe area insets
  5. Type safety prevents bugs - Type navigation params, props, and native module interfaces
  6. Test both platforms early - Platform bugs compound over time; test daily on both

New Architecture (React Native 0.76+):

The New Architecture removes the legacy bridge and provides:

  • Fabric - Modern rendering engine with synchronous layout effects
  • TurboModules - Lazy-loaded native modules with type-safe interfaces
  • JSI (JavaScript Interface) - Direct synchronous JS-to-native calls without serialization
  • Bridgeless Mode - Complete removal of the async bridge for better performance

Performance improvements with New Architecture: ~15ms faster app startup (~8% improvement), ~3.8MB smaller app size (20% reduction), ~15x faster Metro resolver, ~4x faster warm builds.

Mental model:

React Native is NOT "write once, run anywhere" - it's "learn once, write anywhere." Expect to write some platform-specific code. The shared codebase is typically 80-95%, not 100%.

</philosophy>


<patterns>

Core Patterns

Pattern 1: Component Architecture

Build components with TypeScript, accessibility props, and platform awareness. Key concerns: use Pressable over TouchableOpacity, include accessibilityRole/accessibilityState, use testID for E2E tests, and memoize styles with useMemo.

// Key pattern: accessibility + testID + memoized styles
<Pressable
  ref={ref}
  style={buttonStyle}
  onPress={handlePress}
  disabled={disabled}
  testID={testID}
  accessibilityRole="button"
  accessibilityState={{ disabled }}
>
  <Text style={styles.text}>{children}</Text>
</Pressable>

Why good: accessibilityRole/State for screen readers, testID for E2E, Pressable supports android_ripple unlike TouchableOpacity

See examples/core.md for full component with forwardRef, variants, and loading state.


Pattern 2: Safe Area and Keyboard Handling

Handle device notches, status bars, and keyboard properly. Use react-native-safe-area-context (RN's built-in SafeAreaView is deprecated in 0.81+).

import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";

// Screen wrapper with safe areas
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom"]}>
  {children}
</SafeAreaView>

// Keyboard handling for forms
<KeyboardAvoidingView
  style={{ flex: 1 }}
  behavior={Platform.OS === "ios" ? "padding" : "height"}
  keyboardVerticalOffset={Platform.select({ ios: HEADER_HEIGHT, android: 0 })}
>
  <ScrollView keyboardShouldPersistTaps="handled">
    <FormContent />
  </ScrollView>
</KeyboardAvoidingView>

Why good: SafeAreaView handles notches/Dynamic Island, KeyboardAvoidingView prevents keyboard overlap, Platform.select handles iOS/Android differences


Pattern 3: Platform-Specific Code

Handle iOS and Android differences with Platform.select for small differences, separate files (.ios.tsx/.android.tsx) for significant divergence.

// Platform.select for shadows (iOS shadow props ignored on Android)
const styles = StyleSheet.create({
  card: {
    ...Platform.select({
      ios: {
        shadowColor: "#000",
        shadowOffset: { width: 0, height: 2 },
        shadowOpacity: 0.1,
        shadowRadius: 4,
      },
      android: { elevation: 4 },
    }),
  },
  text: {
    fontWeight: Platform.select({ ios: "600", android: "bold" }),
  },
});

Why good: iOS shadow props are completely ignored on Android, fontWeight 100-900 unreliable on Android

For platform-specific file splitting with haptics, see examples/core.md.


Pattern 4: FlashList and FlatList Optimization

Use FlashList for performant lists (cell recycling, 50% less blank area). FlashList v2 is New Architecture only. Always memoize renderItem and keyExtractor. Never add key props to FlashList items (breaks recycling).

// Critical: memoized renderItem + no key prop on items
const renderItem = useCallback(
  ({ item }: { item: Product }) => (
    <ProductItem item={item} onPress={onProductPress} />
  ),
  [onProductPress]
);

<FlashList
  data={products}
  renderItem={renderItem}
  estimatedItemSize={ITEM_HEIGHT} // Optional in v2, required in v1
  getItemType={(item) => item.category} // Improves recycling pool
/>

Why good: useCallback prevents renderItem recreation, getItemType optimizes recycling, no key prop preserves FlashList's main benefit

See examples/performance.md for full FlashList and FlatList optimization patterns.


Pattern 5: React 19 Features (React Native 0.78+)

React Native 0.78+ includes React 19 with new hooks and simplified patterns.

import { useOptimistic } from "react";

// useOptimistic - optimistic UI updates with automatic rollback
const [optimisticMessages, addOptimisticMessage] = useOptimistic(
  messages,
  (state, newMessage: Message) => [...state, { ...newMessage, sending: true }]
);

// ref as props - no more forwardRef wrapper needed (React 19)
function Input({ ref, placeholder, onChangeText }: InputProps) {
  return <TextInput ref={ref} placeholder={placeholder} onChangeText={onChangeText} />;
}

Why good: useOptimistic provides automatic rollback on errors, ref as props eliminates forwardRef boilerplate

</patterns>


<red_flags>

RED FLAGS

High Priority Issues:

  • Using ScrollView + map() for lists with 50+ items - causes severe performance, use FlashList or FlatList
  • Adding key prop to FlashList items - BREAKS cell recycling, eliminates FlashList's main benefit
  • Using React Native's built-in SafeAreaView - deprecated in 0.81+, use react-native-safe-area-context
  • Not testing on both platforms - iOS/Android differences compound; test daily on both
  • Inline functions in FlatList/FlashList renderItem - creates new function every render, breaks memoization
  • Using Reanimated 4 with old architecture - Reanimated 4.x is New Architecture ONLY

Medium Priority Issues:

  • Hardcoded colors/spacing instead of constants - breaks consistency, makes theming impossible
  • Not using Platform.select for shadows - iOS shadow props don't work on Android (use elevation)
  • Missing keyboard handling on forms - keyboard covers inputs without KeyboardAvoidingView
  • Using TouchableOpacity everywhere - Pressable is more flexible and supports android_ripple

Gotchas & Edge Cases:

  • Android fontWeight only supports 'normal' and 'bold' reliably - 100-900 values may not work
  • iOS shadow props are completely ignored on Android - must use elevation for Android shadows
  • StatusBar backgroundColor only works on Android - iOS uses translucent status bar
  • FlatList onEndReached fires immediately if data fits screen - use onEndReachedThreshold carefully
  • KeyboardAvoidingView behavior differs: 'padding' for iOS, 'height' for Android
  • React Native doesn't have CSS cascade - each component must have complete styles
  • Text must be wrapped in <Text> component - raw strings cause crashes
  • New Architecture enabled by default in 0.76+ - some older libraries may need updates
  • FlashList v2 is New Architecture only - use v1 or FlatList if on old architecture
  • React Native 0.78+ uses React 19 - propTypes removed, forwardRef optional
  • React 19 adoption in recent SDK versions - check for breaking changes in your dependencies
  • Android 15/16 enforces edge-to-edge - must handle safe areas properly
  • Reanimated 4 requires react-native-worklets - Reanimated 3 will not work with it installed
  • boxShadow and filter props are New Architecture only - not available on legacy architecture
  • Reanimated 4: withSpring no longer uses restDisplacementThreshold/restSpeedThreshold - replaced by energyThreshold

</red_flags>


<critical_reminders>

CRITICAL REMINDERS

All code must follow project conventions in CLAUDE.md

(You MUST use FlashList (preferred) or FlatList for lists with more than 20 items - NEVER ScrollView with .map() for long lists)

(You MUST memoize renderItem callbacks and use stable keyExtractor functions - avoid key props on FlashList items as it breaks recycling)

(You MUST use react-native-safe-area-context for safe areas - React Native's built-in SafeAreaView is deprecated in 0.81+ and will be removed)

(You MUST test on BOTH iOS AND Android from day one - platform differences cause bugs)

(You MUST use Platform.select() or platform-specific files for platform differences - shadows, fonts, and feedback differ)

(You MUST be aware the New Architecture is enabled by default since React Native 0.76 - Fabric, TurboModules, and bridgeless mode)

Failure to follow these rules will result in poor performance, platform-specific bugs, and broken UX on mobile devices.

</critical_reminders>