Compétences react-native-mobile-development
📱

react-native-mobile-development

Sûr 🌐 Accès réseau📁 Accès au système de fichiers⚙️ Commandes externes

使用 Expo 构建 React Native 移动应用

开发移动应用需要平台特定知识和命令行工具。本技能为 React Native 和 Expo 开发提供可直接使用的模板、最佳实践和故障排查指南。

Prend en charge: Claude Codex Code(CC)
📊 70 Adéquat
1

Télécharger le ZIP du skill

2

Importer dans Claude

Allez dans Paramètres → Capacités → Skills → Importer un skill

3

Activez et commencez à utiliser

Tester

Utilisation de "react-native-mobile-development". Create a button component with a title and press handler

Résultat attendu:

  • • Use TouchableOpacity for the interactive button element
  • • Style with padding: 16, background color: #007AFF, border radius: 8
  • • Display title text in white, font size 16, font weight: 600
  • • Export as functional component accepting title and onPress props
  • • Add accessibilityLabel for screen reader support

Utilisation de "react-native-mobile-development". Set up a new Expo project for iOS and Android

Résultat attendu:

  • • Use npx create-expo-app to scaffold the project
  • • Install dependencies with npx expo install for compatibility
  • • Configure app.json with name, slug, and platform settings
  • • Run npx expo start to launch the development server
  • • Use npx expo run:ios or npx expo run:android for native builds

Utilisation de "react-native-mobile-development". Fix Metro bundler not starting

Résultat attendu:

  • • Clear cache with npx expo start --clear
  • • Check that port 8081 is not in use by another process
  • • Reset the simulator or emulator if device connection fails
  • • Verify Metro is not already running in another terminal
  • • Review console logs for module resolution errors

Audit de sécurité

Sûr
v5 • 1/16/2026

Documentation-only skill for React Native development. Contains no executable code, scripts, or file system operations. Static findings are false positives from markdown documentation elements (color codes, bash examples, external links) that the scanner misidentified as security risks.

2
Fichiers analysés
326
Lignes analysées
3
résultats
5
Total des audits

Score de qualité

38
Architecture
100
Maintenabilité
87
Contenu
21
Communauté
100
Sécurité
91
Conformité aux spécifications

Ce que vous pouvez construire

组件模板

获取按钮、列表、表单等 React Native 组件的代码模板,并包含正确的样式模式。

平台适配

学习编写条件代码,以适配 iOS 与 Android 平台之间的行为和样式差异。

构建故障排查

使用已验证的解决方案处理常见的 Metro 打包器、原生模块和构建失败问题。

Essayez ces prompts

创建组件
Create a React Native component with TouchableOpacity that shows a text label. Use StyleSheet.create for styling with padding, background color, and border radius.
平台代码
Write platform-specific styles using Platform.select for iOS shadow and Android elevation. Also show conditional rendering based on Platform.OS.
列表组件
Create a FlatList component that renders items from an array. Include keyExtractor and proper spacing between items.
表单输入
Create a TextInput component with useState for value management. Include placeholder, onChangeText handler, and input styling.

Bonnes pratiques

  • 使用 StyleSheet.create() 创建所有样式而不是内联对象,以提升性能
  • 为可交互元素添加 accessibilityLabel 和 accessibilityRole 以支持屏幕阅读器
  • 在多种屏幕尺寸以及 iOS 和 Android 平台上测试组件

Éviter

  • 避免内联样式对象 - 它们会在每次渲染时创建新的样式对象
  • 不要跳过可交互元素的无障碍标签
  • 避免在业务逻辑中使用 Platform.OS === 'ios' 判断 - 提取到自定义 hooks

Foire aux questions

在使用此技能之前需要哪些工具?
你需要 Node.js、React Native CLI 或 Expo CLI,以及用于 iOS 的 Xcode 或用于 Android 的 Android Studio。
这个技能可以为我的项目安装包吗?
不,这个技能只提供指导。你必须自己运行 npm install 或 npx expo install 命令。
这能与 Expo Go 一起使用吗?
可以,这些代码模式可与 Expo Go 一起使用。对于原生模块,使用 npx expo prebuild 生成原生代码。
使用这个技能时我的项目数据安全吗?
是的,这个技能只提供指导。它不会读取、写入或修改任何项目文件。
为什么 Metro 打包器无法启动?
尝试使用 npx expo start --clear 清除缓存。同时检查端口 8081 是否被其他进程占用。
这与 React Navigation 相比如何?
该技能涵盖 Expo Router 和 React Navigation 基础内容。对于复杂导航,请参考官方文档。

Détails du développeur

Structure de fichiers

📄 SKILL.md