react-native-apps
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReact Native / Mobile Apps
React Native / 移动应用
When to use this skill
何时使用该技能
- Building mobile apps with React Native or Expo.
- Managing navigation stack.
- Accessing native modules.
- 使用React Native或Expo构建移动应用。
- 管理导航栈。
- 访问原生模块。
1. Expo ecosystem
1. Expo生态系统
- Expo Router: Use file-based routing (similar to Next.js) via .
expo-router - Config: Manage native permissions via config plugins.
app.json
- Expo Router:通过使用基于文件的路由(类似Next.js)。
expo-router - 配置:通过配置插件管理原生权限。
app.json
2. Styling
2. 样式处理
- NativeWind: Use Tailwind-like classes via if standard, or
nativewindfor performance-critical views.StyleSheet.create - SafeArea: Always wrap top-level screens in or handle insets manually.
SafeAreaView
- NativeWind:如果是标准场景,通过使用类Tailwind的样式类;对于性能关键的视图,使用
nativewind。StyleSheet.create - 安全区域:始终将顶级屏幕包裹在中,或手动处理内边距。
SafeAreaView
3. Performance
3. 性能优化
- Lists: Use (Shopify) or optimized
FlashListfor long lists.FlatList - Bridge: Minimize passes over the JS bridge. Use Reanimated for 60fps animations.
- 列表组件:对于长列表,使用Shopify的或经过优化的
FlashList。FlatList - JS桥接:尽量减少JS桥接的交互次数。使用Reanimated实现60fps动画。
4. Navigation
4. 导航实现
- Stack: Use Stack for drill-down.
- Tabs: Use Tabs for top-level sections.
- Deep Links: configure generic links in for universal links.
app.json
- 栈导航:使用Stack实现深度跳转。
- 标签导航:使用Tabs实现顶级板块切换。
- 深度链接:在中配置通用链接以支持全局链接。
app.json