跳到正文
Skillpedia
移动应用14k · #11299

react-native-dev

它能做什么

这项技能是使用 React Native 和 Expo 构建可用于生产环境的移动应用的实用指南。适合希望获得覆盖整个应用(从页面到部署)指导的开发者。

适用场景

  • ✓当你为 iPhone 或 Android 构建 React Native 或 Expo 应用的时候。
  • ✓当你的移动应用需要动画、导航或表单的时候。
  • ✓当你的应用运行缓慢,或你需要规划部署和更新的时候。

技能链接

https://github.com/MiniMax-AI/skills/blob/main/skills/react-native-dev/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/MiniMax-AI/skills/blob/main/skills/react-native-dev/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我构建一个 React Native 应用,包含标签页导航、登录表单和流畅的动画。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能为每个领域列出参考指南,例如导航、样式、动画和状态。智能体会阅读相关指南,并把其中的模式应用到你的应用中。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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 re

常见问题

它涵盖 Expo 吗?

涵盖。它包括 Expo Router、原生功能以及 Expo 应用的项目设置。

它能帮助测试吗?

能。它涵盖测试和性能优化。

升级和发布怎么办?

这项技能涵盖项目结构、部署、SDK 升级以及 CI/CD。

详情

作者的原始描述

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.

repo: MiniMax-AI/skills

热度

GitHub 星标
14k
排名
#11299
许可证
MIT
更新时间
2026/4/18

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能