From react-useeffect
Guides React useEffect usage from official docs: when to use for external sync/data fetching, avoid for derived state/events, use alternatives like useMemo/key prop.
How this skill is triggered — by the user, by Claude, or both
Slash command
/react-useeffect:react-useeffectThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Effects are an **escape hatch** from React. They let you synchronize with external systems. If there is no external system involved, you shouldn't need an Effect.
Effects are an escape hatch from React. They let you synchronize with external systems. If there is no external system involved, you shouldn't need an Effect.
| Situation | DON'T | DO |
|---|---|---|
| Derived state from props/state | useState + useEffect | Calculate during render |
| Expensive calculations | useEffect to cache | useMemo |
| Reset state on prop change | useEffect with setState | key prop |
| User event responses | useEffect watching state | Event handler directly |
| Notify parent of changes | useEffect calling onChange | Call in event handler |
| Fetch data | useEffect without cleanup | useEffect with cleanup OR framework |
useSyncExternalStore when possible)const fullName = firstName + ' ' + lastNameNeed to respond to something?
├── User interaction (click, submit, drag)?
│ └── Use EVENT HANDLER
├── Component appeared on screen?
│ └── Use EFFECT (external sync, analytics)
├── Props/state changed and need derived value?
│ └── CALCULATE DURING RENDER
│ └── Expensive? Use useMemo
└── Need to reset state when prop changes?
└── Use KEY PROP on component
4plugins reuse this skill
First indexed Jun 9, 2026
npx claudepluginhub whinc/agent-toolkit --plugin react-useeffectGuides proper React useEffect usage, covering when to use Effects, how to avoid unnecessary Effects, and solutions for common anti-patterns like derived state, effect chains, and event-specific logic.
Guides React developers through a decision tree to verify useEffect necessity before writing, suggesting alternatives like inline derivation, event handlers, key prop, or TanStack Query to prevent anti-patterns.
Provides React hooks reference with syntax, patterns for useState/useReducer state, useEffect side effects/cleanup, useRef/useContext, useMemo/useCallback optimization, React 19 hooks, custom hooks, and best practices.