better-useeffect

Community

Rewrite React useEffect for clearer control flow.

Authorwhchi
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill helps you reduce reliance on useEffect for derived state, data fetching, or prop-driven side effects by guiding reviewers to prefer render-time derivations, event handlers, external data layers, or explicit mount/unmount boundaries.

Core Features & Use Cases

  • Identify useEffect patterns that derive state and suggest render-time calculations.
  • Promote data fetching through dedicated query/data layers rather than effects.
  • Encourage event-driven actions and explicit mount/unmount handling via useMountEffect or key-based remounts.
  • Use Case: Refactor components that sync from props into render-time derived values for safer updates.

Quick Start

Review a React component with useEffect usage and rewrite to derive values during render, move data-fetching to a data layer, and isolate side effects in event handlers or mount effects.

Dependency Matrix

Required Modules

None required

Components

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: better-useeffect
Download link: https://github.com/whchi/agentic-coding/archive/main.zip#better-useeffect

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.