avoid-effects
CommunityMaster React effect usage; avoid common pitfalls.
AuthorAias
Version1.0.0
Installs0
System Documentation
What problem does it solve?
React code often relies on useEffect to manage a wide range of side effects, causing unnecessary renders, stale state, and convoluted data flow. This Skill helps you distinguish when an effect is truly needed and how to move logic into event handlers or render paths to keep components predictable.
Core Features & Use Cases
- Clarifies when to use useEffect for external sync (fetching data, subscriptions, analytics) and when to handle logic in events or during rendering.
- Provides patterns to avoid derived state inside effects, implement proper cleanup, and cancel asynchronous tasks.
- Covers common scenarios such as prop changes, conditional effects, and avoiding chain-reaction updates by consolidating logic in handlers.
Quick Start
Refactor a component that uses an effect for data fetch on mount so that the fetch is triggered by a user action and all derived state is computed in render.
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: avoid-effects Download link: https://github.com/Aias/dotfiles/archive/main.zip#avoid-effects 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 471,000+ vetted skills library on demand.