What problem does it solve?
React development often leads to inconsistent code quality, unnecessary side effects, and unmaintainable component logic that causes bugs, performance issues, and difficult refactoring cycles as codebases scale.
Core Features & Use Cases
- Component Design Guidance: Enforces single-responsibility components, one-way data flow, and pure render functions to reduce bugs and improve readability.
- Effect Discipline Rules: Eliminates unnecessary useEffect usage, prevents stale closure bugs, and ensures proper synchronization with external systems.
- Custom Hook Best Practices: Provides patterns for extracting reusable logic into stable, domain-specific custom hooks.
- Use Case: When reviewing a React feature branch with redundant effects for data fetching and state synchronization, use this skill to identify antipatterns and refactor code to align with React core best practices.
Quick Start
Use the react-principles skill to audit the Dashboard.tsx file for unnecessary useEffect usage and state management improvements.