react-patterns

Reviews React 19 components against 50+ ranked performance and composition rules.

1|Updated Aug 18, 2026
One-click install
npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill react-patterns-scsm-unrestrict
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-patterns
Source: https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent/tree/main/frontend-engineer/skills/react-patterns
Command: npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill react-patterns-scsm-unrestrict

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React codebases accumulate performance problems—waterfall data fetching, bloated bundles, unnecessary re-renders, and prop-heavy components—that are hard to spot during everyday development and code review. ## Core Features & Use Cases - Impact-Ranked Rule Checklist: 50+ patterns organized by severity (CRITICAL waterfalls and bundle size, HIGH composition architecture, MEDIUM re-renders, data fetching, and React 19 APIs) so reviewers fix the highest-impact issues first. - Review and Refactoring Playbook: Each rule pairs a concrete problem pattern with a specific fix, covering Promise.all parallelization, barrel import elimination, React.lazy code splitting, compound components, useMemo/useCallback discipline, and TanStack Query data fetching. - Use Case: Before merging a PR, run the checklist against changed components to catch sequential awaits, default array props causing re-renders, or boolean prop explosions, then report findings as file:line annotations. ## Quick Start Ask the agent to review a React component file with the react-patterns checklist and report any performance or composition issues by line number.

Frequently Asked Questions about react-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix React performance issues like slow re-renders?

Identify wasteful re-renders with React DevTools Profiler, then apply targeted fixes: hoist default array/object props to constants, derive state with useMemo instead of effects, use primitive dependency values, and move frequently changing values to useRef.

How to eliminate data fetching waterfalls in React?

Replace sequential awaits with Promise.all for independent calls, hoist fetches to the highest common ancestor instead of fetching in nested children, and use a single Suspense boundary around async siblings rather than cascading boundaries.

What changed in React 19 for refs and form state?

React 19 makes ref a regular prop, eliminating forwardRef, renames useFormState to useActionState, allows use() in conditionals and loops, and adds useOptimistic for optimistic updates plus automatic hoisting of title and meta tags.

Does this work with Vite and Cloudflare Workers projects?

Yes, the rules include Vite and Cloudflare-specific guidance such as resolve.dedupe for duplicate React instances, loadEnv for Node scripts, and using c.env or import.meta.env instead of process.env at the edge.

When should I use composition instead of boolean props?

Switch to composition when a component has more than five boolean props. Create explicit variant components like CompactCard, split complex components into compound parts with shared context, or use children with named slots instead of render props.