/frontend-product-design:react-best-practicesfrom frontend-product-design
Guides React component best practices: when to use Effects, refs, custom hooks, and composition patterns over monolithic components.
Ships in frontend-product-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
When working with React, always load both this skill and typescript-best-practices together. TypeScript patterns (type-first development, discriminated unions, Zod validation) apply to React code.
Effects let you "step outside" React to synchronize with external systems. Most component logic should NOT use Effects. Before writing an Effect, ask: "Is there a way to do this without an Effect?"
useMemokey propuseEffectEventSynchronizing with external systems: browser APIs (WebSocket, IntersectionObserver), third-party non-React libraries, window/document event listeners, non-React DOM elements (video, maps).
useMemokey propref.current during render; only in event handlers and effectsuseRef in loops) for dynamic listsuseImperativeHandle to limit what parent can accessuseXxx only if it actually calls other hooks; otherwise use a regular functionuseMount, useEffectOnce) — use useEffect directly so the linter catches missing depschildren over prop drillingisEditing, isThread, hideAttachments) as a composition smell; prefer separate composed components for distinct use casesflushSync when you need to read the DOM synchronously after a state updateSee react-patterns.md for code examples and detailed patterns.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
19 skills in this plugin
/best-practicesApply modern web development best practices for security, compatibility, and code quality. Use when asked to "apply best practices", "security audit", "modernize code", "code quality review", or "check for vulnerabilities"./design-taste-frontendAnti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check./design-taste-frontend-v1npx claudepluginhub firstsun-dev/skills --plugin frontend-product-design