no-use-effect

Replace unnecessary React useEffect calls with five standardized patterns.

Updated Jul 13, 2026
One-click install
npx skills add https://github.com/ElbertePlinio/dotfiles --skill no-use-effect-elberteplinio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: no-use-effect
Source: https://github.com/ElbertePlinio/dotfiles/tree/main/private_dot_factory/plugins/marketplaces/factory-plugins/plugins/typescript/skills/no-use-effect
Command: npx skills add https://github.com/ElbertePlinio/dotfiles --skill no-use-effect-elberteplinio

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about no-use-effect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does unnecessary useEffect cause extra render cycles in React?

Unnecessary useEffect calls trigger extra render cycles because they sync state that could be computed inline, forcing the component to render twice. This skill replaces those patterns with direct calculations to eliminate the redundant cycle.

How do I replace useEffect for deriving state in React components?

To replace useEffect for deriving state, compute the derived value directly during render instead of syncing it through state updates. This skill provides five standardized replacement patterns for common use cases like state derivation.

How can I enforce a no useEffect rule in my React codebase?

You can enforce a no useEffect rule by configuring a no-restricted-syntax lint rule that bans direct useEffect usage. This skill sets up that enforcement to ensure consistent adoption of replacement patterns across your codebase.

Is there a valid use case for useEffect on component mount?

A valid use case for useEffect on component mount is one-time external system synchronization. This skill provides an escape hatch via a useMountEffect utility specifically for this rare scenario while banning standard useEffect calls.

How do I handle data fetching without causing race conditions in React?

To handle data fetching without race conditions, replace useEffect with dedicated fetching patterns. This skill provides standardized replacement patterns for data fetching that avoid the race conditions inherent in useEffect-based fetching logic.