following-the-rules-of-hooks
CommunityFix React Rules of Hooks violations.
Authordjankies
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Violating React Rules of Hooks (calling hooks inside loops, conditions, or non-component functions) leads to unstable state, bugs, and inconsistent render orders.
Core Features & Use Cases
- Detects violations like hooks inside conditional blocks or loops.
- Provides fixes by hoisting hooks to the top level and moving conditional logic into render-time guards.
- Guidance for custom hooks and avoiding hooks inside class components.
Quick Start
Audit components for hook usage in conditions/loops and refactor to call hooks at the top level; push conditional logic into rendering instead of conditional hooks.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 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: following-the-rules-of-hooks Download link: https://github.com/djankies/claude-configs/archive/main.zip#following-the-rules-of-hooks Please download this .zip file, extract it, and install it in the .claude/skills/ directory.