用途:该技能提供使用 Expo 构建生产级 React Native 应用的架构模式,适用于启动新的 React Native 或 Expo 项目、实现复杂导航、集成原生模块与平台 API、构建离线优先应用、优化性能以及配置移动端 CI/CD。
主要能力:包含项目结构组织(app、components、hooks、services、stores、utils、types)、Expo 与裸 React Native 的对比、Expo Router 导航(标签页、动态路由、编程式导航)、认证流程(SecureStore 存储令牌与路由保护)、基于 React Query 的离线优先(AsyncStorage 持久化、NetInfo 在线状态同步、乐观更新)、原生模块集成(触觉反馈、生物识别、推送通知)、平台特定代码(Platform.select 与平台后缀文件)、性能优化(FlashList、memo、useCallback)以及 EAS Build 与提交配置。
使用方式:通过 npx create-expo-app@latest my-app -t expo-template-blank-typescript 创建项目,再用 npx expo install 安装 expo-router、expo-status-bar、react-native-safe-area-context、@react-native-async-storage/async-storage、expo-secure-store、expo-haptics 等依赖。构建命令包括 eas build --platform ios --profile development、eas build --platform android --profile preview、eas build --platform all --profile production;提交用 eas submit --platform ios 或 --platform android;OTA 更新用 eas update --branch production --message "Bug fixes"。
适用场景:需要跨平台移动应用、离线数据同步、原生能力调用或移动端发布流程的团队。
限制:资料未提供具体收费、价格、平台支持范围或效果数据;部分内容(如最佳实践末尾)在资料中不完整。