You Might Not Need An Effect

Review React code for unnecessary useEffect usage based on react.dev guidelines. Analyses code for useEffect anti-patterns and optionally applies fixes. Use when reviewing React code quality or refactoring effects.

majiayu000 Updated 567 repo stars

File contents

Arguments:

  • scope: what to analyze (default: your current changes). Examples: "diff to main", "PR #123", "src/components/", "whole codebase"
  • fix: whether to apply fixes (default: true). Set to false to only propose changes.

Steps:

  1. Read https://react.dev/learn/you-might-not-need-an-effect to understand the guidelines
  2. Analyze the specified scope for useEffect anti-patterns
  3. If fix=true, apply the fixes. If fix=false, propose the fixes without applying.

majiayu000/claude-skill-registry-data/tree/main/data/you-might-not-need-an-effect commit 1702fc6b97

Frequently asked questions

npx skillmds@latest add majiayu000/you-might-not-need-an-effect