rn-performance
79优化 React Native 性能
React Native 应用可能会遇到列表滚动缓慢、额外渲染以及 JS 线程卡顿等问题。此 skill 提供聚焦的模式,用于更快的 FlatList 屏幕、记忆化组件、优化后的选择器、缓存图片以及性能分析。
构建可靠的 React 测试
当异步状态、providers 和 mocks 处理不一致时,React 测试套件经常会变得不稳定。此技能为 Claude、Codex 和 Claude Code 提供用于编写聚焦 React 测试的实用模式。
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "react-testing" from https://skillstore.io/skills/cjharmath-react-testing.md and its manifest at https://skillstore.io/api/skills/cjharmath-react-testing/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
正在使用“react-testing”。 登录表单需要针对必填字段、成功提交和加载行为的测试。
预期结果:
正在使用“react-testing”。 一个 Zustand store 测试在测试用例之间泄漏状态。
预期结果:
正在使用“react-testing”。 带有 React Query 的组件因没有可用 provider 而失败。
预期结果:
All static external command findings are false positives caused by Markdown code fences or inline backticks in documentation examples. The sensitive-data and reconnaissance findings are also false positives from normal test assertions. No evidence of prompt injection, data exfiltration, or malicious intent was found.
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
https://skillstore.io/skills/cjharmath-react-testing/audits/7?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report[](https://skillstore.io/skills/cjharmath-react-testing?utm_source=security_passport_badge)<a href="https://skillstore.io/skills/cjharmath-react-testing?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/cjharmath-react-testing/security.svg" alt="Skillstore security assessment" loading="lazy"></a><iframe src="https://skillstore.io/embed/skills/cjharmath-react-testing.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>CJHarmath. (2026). react-testing security audit report (audit version 7) [Author version unspecified]. Skillstore. https://skillstore.io/skills/cjharmath-react-testing/audits/7@techreport{cjharmath-cjharmath-react-testing-2026,
author = {CJHarmath},
title = {react-testing security audit report (audit version 7)},
institution = {Skillstore},
year = {2026},
number = {7},
url = {https://skillstore.io/skills/cjharmath-react-testing/audits/7},
note = {Author version unspecified}
}cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "react-testing security audit report (audit version 7)"
version: "unspecified"
type: report
authors:
- name: "CJHarmath"
date-released: "2026-07-06"
url: "https://skillstore.io/skills/cjharmath-react-testing/audits/7"
identifiers:
- type: other
value: "skillstore:cjharmath-react-testing:audit:7"
description: "Skillstore immutable audit report identifier"
创建用于验证渲染、加载状态、用户操作和可访问输出的测试。
重置 Zustand stores 和 React Query clients,使测试保持隔离且可重复。
解决 React 测试中的 act 警告、时序问题、缺失查询和 mock 不匹配。
为此组件编写 React Testing Library 测试。覆盖渲染、用户操作、加载状态和可访问查询。
为此异步 React 状态流程创建测试。包括 act 或 waitFor 的用法、store 重置,以及每个异步步骤后的清晰断言。
为这个带有 React Query、routing、context providers 和 mocked API modules 的组件设计测试。保持 provider 设置可复用。
审查这个失败的 React 测试输出和测试文件。识别可能原因,解释修复方法,并建议更强的断言。
作者
CJHarmath许可证
MIT
Skillstore 修订
r1
版本提示
作者未声明版本。
引用
dd4a3ef9f20ddf38830950b4bb713df96b431fd6
维护新鲜度
2026/7/24
使用量
8 次下载 · 229 次浏览
文件结构
📄 SKILL.md
优化 React Native 性能
React Native 应用可能会遇到列表滚动缓慢、额外渲染以及 JS 线程卡顿等问题。此 skill 提供聚焦的模式,用于更快的 FlatList 屏幕、记忆化组件、优化后的选择器、缓存图片以及性能分析。
改进 React Zustand Store 模式
React 团队在使用 Zustand 时可能会遇到过期状态、渲染时序和异步 action bug。此技能为 store、selector、派生状态、测试、调试和持久化提供直接可用的模式。
可靠部署 React 应用
React 部署设置可能重复且容易出错。此技能为 Vercel、Netlify、Docker、CI/CD、环境和监控提供实用示例。
应用 React Native 样式模式
React Native 样式在不同主题、屏幕和平台之间可能变得不一致。此技能为 Expo 应用提供实用的 NativeWind 和 BrandColors 模式。
改进 React Native 可观测性
静默失败和薄弱的错误消息会让移动端 bug 难以诊断。此技能提供实用的 React Native 模式,用于日志、错误、追踪和安全上报。
构建可靠的 React Native Zustand Store
React Native 团队经常在陈旧状态、异步 action 时序以及可避免的渲染上浪费时间。此技能提供 Zustand 模式,让 store 行为更易于推理、测试和调试。
构建可靠的 Jest 测试套件
由 C0ntr0lledCha0s
Jest 项目通常需要一致的设置、mock 和断言模式。此技能为 JavaScript、TypeScript、React 和 Vitest 风格的测试提供聚焦的指导、模板和检查。
构建可靠的测试自动化
由 89jobrien
薄弱的测试会拖慢发布并掩盖回归问题。此技能可指导测试策略、TDD、自动化、覆盖率审查以及 Playwright Web 检查。
审查代码的安全性和质量
由 AutumnsGrove
手动代码审查可能会遗漏安全、性能和测试问题。此技能为 Claude、Codex 和 Claude Code 提供带有检查清单和辅助扫描指导的结构化审查工作流。
在资深指导下构建全栈应用
由 alirezarezvani
全栈项目通常需要一致的设置、架构选择和质量检查。此技能为 React、Next.js、Node.js、GraphQL 和 PostgreSQL 工作提供脚本与参考资料。
实现 React View Transitions
由 vercel-labs
React 视图过渡很容易放错位置,从而导致无提示或嘈杂的动画。此技能可指导路由、Suspense、列表和共享元素动画的选择。
构建类型安全的 React 组件
由 softaworks
React TypeScript 工作通常需要精确的事件、hook 和路由类型。此技能提供针对类型化组件、React 19 API 和路由的聚焦模式。