What problem does it solve?
Unnecessary useEffect calls in React components lead to extra render cycles, race conditions in data fetching, and harder-to-maintain code that duplicates built-in React functionality.
Core Features & Use Cases
- Five Replacement Patterns: Provides standardized alternatives for deriving state, fetching data, handling user actions, mounting external systems, and resetting component state, eliminating the need for most useEffect calls.
- Escape Hatch: Includes a useMountEffect utility for the rare valid use case of one-time external system synchronization on component mount.
- Enforced Lint Rule: Configures a no-restricted-syntax lint rule to ban direct useEffect usage, ensuring consistent adoption across codebases.
- Use Case Example: When building a product list component that filters items by stock status, this skill guides you to compute the filtered list inline instead of syncing it via useEffect, removing an unnecessary render cycle.
Quick Start
Use the no-use-effect skill to replace unnecessary useEffect calls in your React component with the appropriate replacement pattern for your use case.