·writing-react-effects
</>

writing-react-effects

编写 React 组件而无需使用不必要的 useEffect。在创建/查看 React 组件、重构效果或代码使用 useEffect 转换数据或处理事件时使用。

41安装·1热度·@dust-tt

安装

$npx skills add https://github.com/dust-tt/dust --skill writing-react-effects

如何安装 writing-react-effects

通过命令行快速安装 writing-react-effects AI 技能到你的开发环境

  1. 打开终端: 打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 运行安装命令: 复制并运行以下命令:npx skills add https://github.com/dust-tt/dust --skill writing-react-effects
  3. 验证安装: 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

来源:dust-tt/dust。

SKILL.md

查看原文

Guides writing React components that avoid unnecessary useEffect calls.

Effects are an escape hatch for synchronizing with external systems (network, DOM, third-party widgets). If there's no external system, you don't need an Effect.

If a value can be computed from current props/state, do not store it in state or update it in an effect. Derive it during render to avoid extra renders and state drift. Do not set state in effects solely in response to prop changes; prefer derived values or keyed resets instead.

编写 React 组件而无需使用不必要的 useEffect。在创建/查看 React 组件、重构效果或代码使用 useEffect 转换数据或处理事件时使用。 来源:dust-tt/dust。

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/dust-tt/dust --skill writing-react-effects
分类
</>开发工具
认证
收录时间
2026-02-26
更新时间
2026-03-10

Browse more skills from dust-tt/dust

快速解答

什么是 writing-react-effects?

编写 React 组件而无需使用不必要的 useEffect。在创建/查看 React 组件、重构效果或代码使用 useEffect 转换数据或处理事件时使用。 来源:dust-tt/dust。

如何安装 writing-react-effects?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/dust-tt/dust --skill writing-react-effects 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

这个 Skill 的源码在哪?

https://github.com/dust-tt/dust