ahooks
БесплатноБез исполняемых скриптовНе проверенComprehensive ahooks React hooks library specialist. Expert in all 76+ ahooks hooks including state management, effects, data fetching, performance…
Об этом скилле
Ahooks React Hooks Library
This skill provides comprehensive expertise for the ahooks React hooks library, covering all 76+ hooks with detailed documentation, examples, and best practices.
Quick Start
Basic Usage
import { useRequest, useMount, useSetState } from 'ahooks';
const MyComponent = () => {
const { data, loading, error } = useRequest('/api/data');
const [state, setState] = useSetState({ count: 0 });
useMount(() => {
console.log('Component mounted');
});
return <div>{data}</div>;
};
Common Patterns
- State Management:
useSetState,useToggle,useBooleanfor complex state - Data Fetching:
useRequestfor API calls with caching, retry, polling - Performance:
useDebounce,useThrottlefor optimization - Lifecycle:
useMount,useUnmount,useUpdateEffectfor component lifecycle
Hook Categories
This skill organizes hooks into 9 main categories:
📊 State Management (12 hooks)
State utilities for complex state handling. See: state-hooks.md
🔄 Lifecycle Effects (9 hooks)
Component lifecycle and effect management. See: effect-hooks.md
🌐 Data Fetching (6 hooks)
API calls, pagination, infinite scroll, and data caching. See: request-hooks.md
⚡ Performance Optimization (9 hooks)
Debounce, throttle, memoization, and RAF optimizations. See: performance-hooks.md
🎨 DOM & UI (12 hooks)
Event listeners, sizing, scrolling, and UI interactions. See: dom-hooks.md
💾 Storage (4 hooks)
Local storage, session storage, cookies, and URL state. See: dom-hooks.md
🌍 Browser APIs (8 hooks)
Network status, visibility, keyboard events, and browser features. See: dom-hooks.md
⏰ Timers (4 hooks)
Intervals, timeouts, and countdown utilities. See: advanced-hooks.md
🚀 Advanced Utilities (12 hooks)
WebSockets, history management, reactive data, and complex patterns. See: advanced-hooks.md
Getting Help
Ask About:
- Hook Usage: "How to use useRequest with pagination?"
- Migration: "How to migrate from useState to useSetState?"
- Best Practices: "Performance tips for React hooks?"
- Integration: "How to combine useRequest with useAntdTable?"
- Troubleshooting: "Why is my useDebounce not working?"
- TypeScript: "Type definitions for useBoolean?"
Comprehensive Guides
- Migration Guide - From React built-ins
- Best Practices - Performance and patterns
Quick Reference
// Most commonly used hooks
import {
useRequest, // Data fetching
useMount, // Component mount
useUnmount, // Component unmount
useSetState, // State management
useDebounce, // Performance
useThrottle, // Performance
useEventListener // DOM events
} from 'ahooks';
Установить ahooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ahooks?
Comprehensive ahooks React hooks library specialist. Expert in all 76+ ahooks hooks including state management, effects, data fetching, performance optimization, DOM utilities, and advanced patterns. Use when working with ahooks library, need React hooks utilities or want to learn best practices.
Как установить скилл ahooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ahooks запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic