full-stack-skills/react-skills

react-hooks

Provides comprehensive guidance for React Hooks including useState, useEffect, useContext, useReducer, useMemo, useCallback, custom hooks, and hook patterns.

Zobacz źródło

Jak używać

  1. Skopiuj polecenie instalacji i sprawdź źródła przed instalacją we własnym środowisku agenta.
  2. W oryginale sprawdź wymagane narzędzia, dane dostępowe i obsługiwane środowiska.
  3. Opisz dane wejściowe i oczekiwany rezultat; porównaj wynik ze źródłami.
npx skills add https://github.com/full-stack-skills/react-skills --skill react-hooks

Przed rozpoczęciem

  • Instalacja nie obejmuje subskrypcji modelu, limitu API ani uprawnień do plików.
  • Gwiazdki i instalacje pokazują aktywność, a nie niezależny test jakości lub bezpieczeństwa.
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

When to use this skill

Use this skill whenever the user wants to:

  • 用 React Hooks(useState、useEffect、useContext、自定义)管理状态与副作用
  • 遵循 Hooks 规则与最佳实践、避免闭包与依赖问题

How to use this skill

  1. 基础:useState、useEffect(依赖数组、清理函数);useContext、useRef。
  2. 进阶:useMemo、useCallback、自定义 Hook;useReducer、useLayoutEffect。
  3. 参考:https://react.dev/reference/react

Best Practices

  • 依赖数组完整;清理订阅与定时器。
  • 自定义 Hook 命名 useXxx;避免条件/循环中调 Hook。

Keywords

React Hooks, useState, useEffect, 自定义 Hook

Powiązane zadania

z tego samego repozytorium

Więcej Skills

Wszystkie Skills
full-stack-skills
Społeczność

nextjs

Guidance for Next.js using the official docs at nextjs.org/docs. Use when the user needs Next.js concepts, configuration, routing, data fetching, or API reference details.

instalacje
2
GitHub Stars
2
Aktualizacja
3 paź
full-stack-skills
Społeczność

react

Provides comprehensive guidance for React development including components, JSX, props, state, hooks, context, performance optimization, and best practices. Use when the user asks about React, needs to create React components, implement hooks, manage component state, or build React applications.

instalacje
2
GitHub Stars
2
Aktualizacja
3 paź
full-stack-skills
Społeczność

redux

Provides comprehensive guidance for Redux state management including stores, actions, reducers, middleware, selectors, and Redux Toolkit. Use when the user asks about Redux, needs to manage global state, implement Redux patterns, or work with Redux middleware.

instalacje
2
GitHub Stars
2
Aktualizacja
3 paź
full-stack-skills
Społeczność

react-native

Provides comprehensive guidance for React Native development including components, navigation, native modules, platform-specific code, and mobile app development. Use when the user asks about React Native, needs to create mobile applications, implement React Native components, or work with React Native features.

instalacje
1
GitHub Stars
2
Aktualizacja
3 paź