·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