you-dont-need-a-react-custom-hooks

Installation
SKILL.md

You Don't Need a React Custom Hooks

Overview

A React custom hook is not the default unit of abstraction; it is the last option. Custom hooks make it easy to add dependencies and side effects, which can give a module too many responsibilities and create tight coupling internally. These hidden dependencies make code harder to trace, so modules that depend on React need stricter responsibility boundaries than ordinary modules.

This skill does not ban custom hooks. Instead, before creating one, first check whether an ordinary module is enough. Use a hook only when its concern, responsibility, role, and dependencies are clear.

When to Use

Use this skill when:

  • Evaluating React component or custom hook code
  • Designing or implementing a new React component or custom hook
  • Refactoring an existing custom hook or extracting a new custom hook from a React component

Do not use this skill when:

Related skills
Installs
1
GitHub Stars
1
First Seen
5 days ago