rn-best-practices

分类: 内容与多媒体 | 上传者: LykhoydaLykhoyda | 下载: 0 | 版本: v1.0(最新)

React Native 和 Expo 构建高性能移动应用程序的最佳实践。在检查 React Native 代码、设计组件架构、实现功能、优化列表性能、实现动画、使用本机模块、检查性能问题、审核 UI 组件、检查状态管理或检查生产准备情况时使用。触发“审核最佳实践”、“检查性能”、“优化渲染”、“审核列表渲染”、“检查动画模式”、“审核状态管理”、“审核 UI”、“检查崩溃”、“审核生产准备情况”、“检查 React Native 约定”、“性能审核”。 --- # React Native 最佳实践规则 来自 [vercel-labs/agent-skills](https://github.com/vercel-labs/agent-skills) 的 36 条规则(MIT 许可证)加上通过故事测试发现的 3 条 rn-dev-agent 规则。 每个规则在“references/<rule-name>.md”中都有完整的错误/正确代码示例。 --- ## 规则索引 首先扫描此表。加载正在审查的代码中存在的任何规则类别的相应参考文件。 |身份证 |规则|影响 |参考文件| |----|------|--------|----------------| | 1.1|切勿将 `&&` 与可能为假的值一起使用 |关键 | `references/rendering-no-falsy-and.md` | | 1.2 | 1.2将字符串包裹在 `<Text>` 组件中 |关键 | `references/rendering-text-in-text.md` | | 2.1 | 2.1避免在 renderItem | 中使用内联对象高| `references/list-perf-inline-objects.md` | | 2.2 | 2.2将回调提升到列表的根 |高| `references/list-performance-callbacks.md` | | 2.3 | 2.3保持列表项轻量级 |高| `references/list-perf-expense-item.md` | | 2.4 | 2.4列表之前的稳定对象引用 |关键 | `references/list-perf-fn-refs.md` | | 2.5 | 2.5将基元传递给列表项以进行记忆 |高| `references/list-performance-item-memo.md` | | 2.6 | 2.6对任何列表使用列表虚拟器 |高| `references/list-performance-virtualize.md` | | 2.7 | 2.7使用压缩图像 i n 列表 |高| `参考文献/li

更新日志: Source: GitHub https://github.com/Lykhoyda/rn-dev-agent

目录结构

当前层级: tree/main/skills/rn-best-practices/

  • 📁 references/
    • 📄 anim-gesture-press.md 2.5 KB
    • 📄 animation-derived-value.md 1.3 KB
    • 📄 animation-gpu-properties.md 2.0 KB
    • 📄 compiler-destructure-fns.md 1.2 KB
    • 📄 compiler-reanimated-shared.md 1.2 KB
    • 📄 design-compound-components.md 1.6 KB
    • 📄 fonts-config-plugin.md 1.4 KB
    • 📄 imports-design-system-folder.md 1.4 KB
    • 📄 js-hoist-intl.md 1.6 KB
    • 📄 list-perf-expensive-item.md 2.4 KB
    • 📄 list-perf-fn-refs.md 4.0 KB
    • 📄 list-perf-inline-objects.md 2.3 KB
    • 📄 list-performance-callbacks.md 1.3 KB
    • 📄 list-performance-images.md 1.4 KB
    • 📄 list-performance-item-memo.md 2.2 KB
    • 📄 list-performance-item-types.md 2.7 KB
    • 📄 list-performance-virtualize.md 1.7 KB
    • 📄 monorepo-native-deps-in-app.md 1.1 KB
    • 📄 monorepo-single-deps.md 1.3 KB
    • 📄 navigation-native-navigators.md 4.8 KB
    • 📄 query-cache-reactive.md 1.9 KB
    • 📄 react-state-dispatcher.md 2.2 KB
    • 📄 react-state-fallback.md 1.7 KB
    • 📄 react-state-minimize.md 1.7 KB
    • 📄 reanimated-in-lists.md 2.7 KB
    • 📄 rendering-no-falsy-and.md 1.8 KB
    • 📄 rendering-text-in-text.md 697 B
    • 📄 scroll-position-no-state.md 1.9 KB
    • 📄 state-ground-truth.md 2.1 KB
    • 📄 theme-memoization-lists.md 2.3 KB
    • 📄 ui-expo-image.md 1.6 KB
    • 📄 ui-image-gallery.md 2.5 KB
    • 📄 ui-measure-views.md 2.2 KB
    • 📄 ui-menus.md 4.5 KB
    • 📄 ui-native-modals.md 1.8 KB
    • 📄 ui-pressable.md 1.5 KB
    • 📄 ui-safe-area-scroll.md 1.5 KB
    • 📄 ui-scrollview-content-inset.md 1.3 KB
    • 📄 ui-styling.md 2.2 KB
  • 📄 SKILL.md 7.7 KB

SKILL.md

登录后下载/点赞/收藏 ❤ 5 | ★ 0
评论 0

请先登录后评论。

评论加载中...