计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
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.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
useEffect, custom hooks, refs, transitions, or hook dependency problems in React.
metadata:
triggers:
files:
- '/*.tsx'
- '/*.jsx'
keywords:
- useEffect
- useCallback
- useMemo
- useState
- useRef
- useContext
- useReducer
- useLayoutEffect
- custom hookEffects sync external systems. Everything else should stay in render, event handlers, or custom hooks.
useEffect only for subscriptions, timers, network lifecycle, DOM APIs, or other external systems.useEffectEvent when effect logic needs current props/state without widening dependencies.useRef.useMemo / useCallback only for measured hotspots or memoized child contracts.startTransition / useDeferredValue for non-urgent updates.AbortController when an effect owns request cancellation.useEffect subscriptions return cleanup functions?useEffect to sync state.useState(() => heavy()).When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant: