react-native-dev
Skill này làm gì
Skill này là hướng dẫn thực tế để xây ứng dụng di động sẵn sàng sản xuất bằng React Native và Expo. Skill dành cho lập trình viên cần hướng dẫn cho toàn bộ ứng dụng, từ màn hình đến triển khai.
Khi nào nên dùng
- ✓Khi bạn xây ứng dụng React Native hoặc Expo cho iPhone hoặc Android.
- ✓Khi bạn cần hoạt ảnh, điều hướng hoặc biểu mẫu trong ứng dụng di động.
- ✓Khi ứng dụng của bạn chạy chậm hoặc bạn cần lên kế hoạch triển khai và cập nhật.
Liên kết skill
https://github.com/MiniMax-AI/skills/blob/main/skills/react-native-dev/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn xây ứng dụng React Native với điều hướng dạng tab, biểu mẫu đăng nhập và hoạt ảnh mượt.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill liệt kê các hướng dẫn tham khảo cho từng lĩnh vực, như điều hướng, kiểu dáng, hoạt ảnh và trạng thái. Agent đọc hướng dẫn liên quan và áp dụng các mẫu vào ứng dụng của bạn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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:
- references/navigation.md — Expo Router: Stack, Tabs, NativeTabs (
headerLargeTitle,headerBackButtonDisplayMode), links, modals, sheets, context menus - references/components.md — FlashList patterns,
expo-image, safe areas (contentInsetAdjustmentBehavior), native controls, blur/glass effects, storage - references/styling.md — StyleSheet, NativeWind/Tailwind, platform styles, theming, dark mode
- references/animations.md — Reanimated 3: entering/exiting, shared values, gestures, scroll-driven
- references/state-management.md — Zustand (selectors, persist), Jotai (atoms, derived), React Query, Context
- references/forms.md — React Hook Form + Zod: validation, multi-step, dynamic arrays
- references/networking.md — fetch wrapper, React Query (optimistic updates), auth tokens, offline, API routes, webhooks
- references/performance.md — Profiling workflow, FlashList +
memo, bundle analysis, TTI, memory leaks, animation perf - references/testing.md — Jest, React Native Testing Library, E2E with Maestro
- references/native-capabilities.md — Camera, location, permissions (
use*Permissionshooks), haptics, notifications, biometrics - references/engineering.md — Project layout (
components/ui/,stores/,services/), path aliases, SDK upgrades, EAS build/submit, CI/CD, DOM components
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:
- Set entry point in
package.json:"main": "expo-router/entry" - Add scheme in
app.json:"scheme": "my-app" - Delete
App.tsxandindex.ts - Create
app/_layout.tsxas root Stack layout - Create
app/(tabs)/_layout.tsxfor tab navigation - 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
Câu hỏi thường gặp
Skill có đề cập Expo không?
Có. Skill bao gồm Expo Router, các tính năng gốc và thiết lập dự án cho Expo.
Nó có giúp kiểm thử không?
Có. Skill bao gồm kiểm thử và tối ưu hiệu năng.
Còn nâng cấp và phát hành thì sao?
Skill bao gồm cấu trúc dự án, triển khai, nâng cấp SDK và CI/CD.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 14k
- Vị trí xếp hạng
- #11299
- Giấy phép
- MIT
- Cập nhật
- 18/4/2026
Bình luận
- …
Thêm skill từ kho mã này
design-style-skill
14kGiúp agent của bạn chọn một phong cách slide nhất quán, từ sắc nét và gọn đến mềm mại, bo tròn hoặc thoáng, với góc và khoảng cách khớp.
ppt-editing-skill
14kGiúp agent của bạn chỉnh sửa tệp hoặc mẫu PowerPoint hiện có một cách an toàn: đổi nội dung, sắp xếp hoặc xóa slide, và đóng gói lại bộ trình chiếu hợp lệ.
ppt-orchestra-skill
14kGiúp agent của bạn lên kế hoạch toàn bộ bộ trình chiếu PowerPoint trước khi dựng, xếp mỗi slide vào loại trang chuẩn và kiểm tra nội dung.
slide-making-skill
14kGiúp agent của bạn viết từng slide PowerPoint bằng JavaScript với PptxGenJS, gồm bố cục, chữ, hình ảnh, biểu đồ và phông chữ cho tệp .pptx gốc.
Skill tương tự
android-clean-architecture
280kGiúp agent của bạn tổ chức dự án Android hiệu quả, cấu trúc code để việc bảo trì và phát triển tính năng mới dễ dàng hơn.
compose-multiplatform-patterns
280kGiúp agent của bạn dùng các mẫu Compose Multiplatform và Jetpack Compose trong dự án KMP, gồm trạng thái, điều hướng, giao diện và hiệu năng.
dart-flutter-patterns
280kGiúp agent của bạn viết code cho ứng dụng Dart và Flutter. Agent dùng các mẫu hiện đại để tạo ứng dụng vững chắc và dễ quản lý.