react-useeffect-avoid
CommunityAvoid useEffect pitfalls in React.
Authorklen
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill guides developers on when not to use React's useEffect hook, preventing common performance issues, bugs, and complex state management problems.
Core Features & Use Cases
- Identify Anti-Patterns: Recognizes and explains common mistakes like using
useEffectfor derived state, state resets, or waterfalls. - Suggest Alternatives: Provides clear, idiomatic React solutions like calculating during render, using the
keyprop, or leveraging event handlers. - Use Case: A developer is unsure if they should use
useEffectto update a list based on a prop change. This Skill explains why that's an anti-pattern and shows them how to achieve the same result more efficiently by filtering during render.
Quick Start
Explain why using useEffect to reset form state when a prop changes is an anti-pattern and provide the recommended alternative.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: react-useeffect-avoid Download link: https://github.com/klen/dotfiles/archive/main.zip#react-useeffect-avoid Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.