react-errors-hooks

Diagnose React hook errors and eslint-plugin-react-hooks violations in TypeScript components.

6|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/OpenAEC-Foundation/React-Claude-Skill-Package --skill react-errors-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-errors-hooks
Source: https://github.com/OpenAEC-Foundation/React-Claude-Skill-Package/tree/main/skills/source/react-errors/react-errors-hooks
Command: npx skills add https://github.com/OpenAEC-Foundation/React-Claude-Skill-Package --skill react-errors-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Use when encountering hook-related errors, infinite re-render loops, stale state issues, or eslint-plugin-react-hooks warnings. Prevents the common mistake of calling hooks conditionally or missing cleanup in useEffect.

Core Features & Use Cases

  • Diagnostic tables for hook errors and common violations
  • Rules of Hooks guidance and actionable fixes
  • Anti-pattern catalog with practical repair strategies

Quick Start

Paste a React component with hook misuses to get guided corrections and best practices.

Frequently Asked Questions about react-errors-hooks

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

FAQPage Schema
Why does my React component cause an infinite re-render loop?

Infinite re-render loops in React usually stem from incorrect useEffect dependencies or updating state unconditionally. This Skill diagnoses hook errors and provides actionable repair guidance to break the cycle and correct hook usage.

How do I fix eslint-plugin-react-hooks violations in TypeScript?

Fixing eslint-plugin-react-hooks violations requires correcting missing dependencies and Rules of Hooks breaches. Paste your React component to receive diagnostic tables, anti-pattern catalogs, and targeted repair strategies for React 18/19 TypeScript projects.

What is a stale closure in React hooks and how do I resolve it?

A stale closure in React hooks occurs when a useEffect captures outdated state values due to missing dependencies. This Skill identifies stale closures and provides actionable repair guidance to ensure your hooks capture current state correctly.

How do I add proper cleanup to a useEffect hook?

Adding cleanup to a useEffect hook prevents memory leaks and invalid state updates. This Skill guides correct hook usage and cleanup by providing anti-pattern catalogs and practical repair strategies for your React components.

Can I use this to debug Rules of Hooks violations in React 19?

Yes, you can debug Rules of Hooks violations in React 19. This Skill applies to React 18 and 19 TypeScript projects, offering diagnostic tables and Rules of Hooks guidance to fix conditional hook calls and other violations.