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

react-native-mobile-development

Build and manage React Native/Expo mobile apps including project setup, development workflows, and platform-specific guidance. Use when working on mobile app development, configuration, or running apps.

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

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

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

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

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して react-native-mobile-development.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → react-native-mobile-development フォルダができる
  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 と Expo を使用してモバイルアプリを構築するためのガイドです。

使用する場面

  • React Native/Expo プロジェクトのセットアップ
  • 開発サーバーまたはビルドの実行
  • モバイルコンポーネントの作成
  • プラットフォーム固有のコード (iOS/Android) の処理
  • app.json またはネイティブモジュールの構成
  • モバイル固有の問題のトラブルシューティング

主要なコマンド

# 開発
npm start               # Metro bundler を起動
npm run ios            # iOS シミュレーターで実行
npm run android        # Android エミュレーターで実行

# Expo 固有
npx expo start         # Expo CLI で起動
npx expo install PKG   # 互換性のあるパッケージをインストール
npx expo prebuild      # ネイティブコードを生成

コンポーネント構造

// モバイルコンポーネントのテンプレート
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';

interface Props {
  title: string;
  onPress: () => void;
}

export function MyComponent({ title, onPress }: Props) {
  return (
    <TouchableOpacity onPress={onPress} style={styles.container}>
      <Text style={styles.text}>{title}</Text>
    </TouchableOpacity>
  );
}

const styles = StyleSheet.create({
  container: {
    padding: 16,
    backgroundColor: '#007AFF',
    borderRadius: 8,
  },
  text: {
    color: '#FFFFFF',
    fontSize: 16,
    fontWeight: '600',
  },
});

プラットフォーム固有のコード

import { Platform } from 'react-native';

// 条件付きレンダリング
{Platform.OS === 'ios' && <IOSComponent />}
{Platform.OS === 'android' && <AndroidComponent />}

// プラットフォーム固有の値
const height = Platform.select({
  ios: 44,
  android: 56,
  default: 50,
});

// プラットフォーム固有のスタイル
const styles = StyleSheet.create({
  container: {
    ...Platform.select({
      ios: { shadowColor: '#000', shadowOpacity: 0.3 },
      android: { elevation: 4 },
    }),
  },
});

ベストプラクティス

  1. パフォーマンス: StyleSheet.create() を使用し、インラインスタイルを避け、画像を最適化します
  2. アクセシビリティ: accessibilityLabelaccessibilityRole を追加します
  3. レスポンシブ: さまざまな画面サイズでテストします
  4. ナビゲーション: React Navigation または Expo Router を使用します
  5. 状態: コンポーネントの状態を最小限に保ち、共有状態にはコンテキスト/ストアを使用します

一般的なパターン

リスト

import { FlatList } from 'react-native';

<FlatList
  data={items}
  keyExtractor={(item) => item.id}
  renderItem={({ item }) => <ItemComponent item={item} />}
/>

フォーム

import { TextInput } from 'react-native';
const [value, setValue] = useState('');

<TextInput
  value={value}
  onChangeText={setValue}
  placeholder="Enter text"
  style={styles.input}
/>

ローディング状態

import { ActivityIndicator } from 'react-native';

{loading ? <ActivityIndicator /> : <Content />}

トラブルシューティング

  • Metro が起動しない: npx expo start --clear でキャッシュをクリアします
  • ネイティブモジュールエラー: npx expo prebuild --clean を実行します
  • ビルドが失敗する: app.json の構成を確認します
  • シミュレーターの問題: シミュレーターまたはエミュレーターをリセットします

参考資料

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

React Native Mobile Development

Guide for building mobile apps with React Native and Expo.

When to Use

  • Setting up React Native/Expo projects
  • Running dev servers or builds
  • Creating mobile components
  • Handling platform-specific code (iOS/Android)
  • Configuring app.json or native modules
  • Troubleshooting mobile-specific issues

Core Commands

# Development
npm start               # Start Metro bundler
npm run ios            # Run on iOS Simulator
npm run android        # Run on Android Emulator

# Expo specific
npx expo start         # Start with Expo CLI
npx expo install PKG   # Install compatible packages
npx expo prebuild      # Generate native code

Component Structure

// Mobile component template
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';

interface Props {
  title: string;
  onPress: () => void;
}

export function MyComponent({ title, onPress }: Props) {
  return (
    <TouchableOpacity onPress={onPress} style={styles.container}>
      <Text style={styles.text}>{title}</Text>
    </TouchableOpacity>
  );
}

const styles = StyleSheet.create({
  container: {
    padding: 16,
    backgroundColor: '#007AFF',
    borderRadius: 8,
  },
  text: {
    color: '#FFFFFF',
    fontSize: 16,
    fontWeight: '600',
  },
});

Platform-Specific Code

import { Platform } from 'react-native';

// Conditional rendering
{Platform.OS === 'ios' && <IOSComponent />}
{Platform.OS === 'android' && <AndroidComponent />}

// Platform-specific values
const height = Platform.select({
  ios: 44,
  android: 56,
  default: 50,
});

// Platform-specific styles
const styles = StyleSheet.create({
  container: {
    ...Platform.select({
      ios: { shadowColor: '#000', shadowOpacity: 0.3 },
      android: { elevation: 4 },
    }),
  },
});

Best Practices

  1. Performance: Use StyleSheet.create(), avoid inline styles, optimize images
  2. Accessibility: Add accessibilityLabel and accessibilityRole
  3. Responsive: Test on different screen sizes
  4. Navigation: Use React Navigation or Expo Router
  5. State: Keep component state minimal, use context/store for shared state

Common Patterns

Lists

import { FlatList } from 'react-native';

<FlatList
  data={items}
  keyExtractor={(item) => item.id}
  renderItem={({ item }) => <ItemComponent item={item} />}
/>

Forms

import { TextInput } from 'react-native';
const [value, setValue] = useState('');

<TextInput
  value={value}
  onChangeText={setValue}
  placeholder="Enter text"
  style={styles.input}
/>

Loading States

import { ActivityIndicator } from 'react-native';

{loading ? <ActivityIndicator /> : <Content />}

Troubleshooting

  • Metro won't start: Clear cache with npx expo start --clear
  • Native module error: Run npx expo prebuild --clean
  • Build fails: Check app.json configuration
  • Simulator issues: Reset simulator or emulator

Resources