react-hooks
SKILL.md
React Hooks Best Practices
This skill provides guidance for writing clean, efficient React hooks code with emphasis on eliminating unnecessary hooks and following established best practices.
Core Philosophy: Less Is More
The primary principle is to use hooks only when necessary. Many React applications suffer from hook overuse, particularly:
useEffectfor logic that should be in event handlersuseMemo/useCallbackfor cheap computationsuseStatefor derived state
Before adding any hook, ask: "Can this be done without a hook?"
Mandatory Rules
1. Linter Compliance is Non-Negotiable
Never suppress react-hooks/exhaustive-deps warnings. The ESLint plugin understands React's rules better than manual reasoning. If a warning appears: