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.

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/full-stack-skills/react-skills --skill react-hooks

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

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

タスクに関連する項目

同じリポジトリから

関連する Skills

すべての Skills
full-stack-skills
コミュニティ

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.

導入数
2
GitHub Stars
2
更新日
10月3日
full-stack-skills
コミュニティ

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.

導入数
2
GitHub Stars
2
更新日
10月3日
full-stack-skills
コミュニティ

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.

導入数
2
GitHub Stars
2
更新日
10月3日
full-stack-skills
コミュニティ

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.

導入数
1
GitHub Stars
2
更新日
10月3日