skills/react/react-hooks/SKILL.md
Write efficient React functional components and hooks. Use when writing custom hooks, optimizing useEffect, or working with useMemo/useCallback in React.
npx skillsauth add hoangnguyen0403/agent-skills-standard react-hooksInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Role: React Performance Expert. Optimize renders, prevent memory leaks.
useMemo before putting them in deps, or using useRef for stable refs.useState for internal state and return only what's needed.useEffect: Sync with external systems ONLY. Cleanup required for subscriptions/event listeners. Return cleanup function from effect. Use AbortController for fetch cleanup to prevent state updates after unmount.useRef: Mutable state without re-renders (DOM, timers, tracking).useMemo/Callback: Measure first. Use for stable refs or heavy computation.useLatest pattern (ref) for event handlers to avoid dependency changes; see useLatest ref pattern example for reference implementation.useTransition / useDeferredValue for non-blocking UI updates.useState(() => expensive()).useEffect subscriptions return cleanup functions?useEffect to sync state.useState(() => heavy()).development
Summarizes GitHub PR, GitLab MR, or Azure DevOps PR metadata, review threads, changed files, and template completeness. Use during review-ticket or code-review workflows when PR/MR context exists.
tools
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling.
development
Validate input, secure auth tokens, and prevent injection attacks in TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration.
development
Apply modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings.