react-hooks
БесплатноБез исполняемых скриптовНе проверенWrite React hooks with clean effect boundaries and measured memoization. Use when working with `useEffect`, custom hooks, refs, transitions, or hook…
от HoangNguyen0403★ 598 звёзд на GitHubОб этом скилле
React Hooks Expert
Priority: P0 (CRITICAL)
Effects sync external systems. Everything else should stay in render, event handlers, or custom hooks.
Rules
- Effects: use
useEffectonly for subscriptions, timers, network lifecycle, DOM APIs, or other external systems. - Dependency churn: objects recreated each render cause unstable dependencies; move to primitives, refs, or measured memoization.
- Effect events: use
useEffectEventwhen effect logic needs current props/state without widening dependencies. - Refs: store mutable, non-render state in
useRef. - Memoization: add
useMemo/useCallbackonly for measured hotspots or memoized child contracts. - Concurrency: use
startTransition/useDeferredValuefor non-urgent updates. - Fetch cleanup: use
AbortControllerwhen an effect owns request cancellation.
Verify
- Hooks stay at top level.
- Effects have cleanup when they subscribe, attach, or schedule.
- No effect exists only to derive render state from other render state.
- Dependency arrays reflect real external dependencies.
- Custom hooks hide internal wiring and expose a small API.
Performance Checklist (Mandatory)
- Rules of Hooks: Called at top level? No loops/conditions?
- Dependencies: object/function deps exist for a reason, not by accident?
- Cleanup:
useEffectsubscriptions return cleanup functions? - Render Count: component re-render excessively?
Anti-Patterns
- No Missing Deps: Fix logic, don't disable linter.
- No giant effects: Split unrelated sync concerns.
- No Derived State: Compute during render, don't
useEffectto sync state. - No Heavy Init: Use lazy state initialization
useState(() => heavy()).
References
Установить react-hooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл react-hooks?
Write React hooks with clean effect boundaries and measured memoization. Use when working with `useEffect`, custom hooks, refs, transitions, or hook dependency problems in React.
Как установить скилл react-hooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл react-hooks запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic