React Composition Patterns
Refactor React components with compound components, state lifting, and composition patterns that avoid boolean-prop sprawl.
Best for
React developers designing reusable component APIs and shared UI systems.
npx skills add vercel-labs/agent-skills --skill composition-patterns
Common use cases
When to use this skill
- Replace components with too many boolean props.
- Design compound components with clear ownership.
- Reduce prop drilling without hiding state flow.
Example prompts
Prompts you can adapt
How to use it
A simple workflow
Open the verified Vercel source on GitHub and review its SKILL.md or repository documentation.
npx skills add vercel-labs/agent-skills --skill composition-patterns
Start with an example prompt below, adapt it to your project, and verify the result.
FAQ
Questions about React Composition Patterns
Is this linked to an official public source?
Yes. This page links directly to the Vercel GitHub source shown above. Review its documentation and license before production use.
How do I add this skill?
Run the setup command shown on this page, then refresh your agent if required.
Related skills
Keep building the workflow
React Best Practices
Apply Vercel Engineering guidance to React and Next.js code, with emphasis on performance, rendering, and bundle efficiency.
React View Transitions
Implement native-feeling page and component transitions with React's View Transition APIs and Next.js patterns.
Web Design Guidelines
Review web interfaces against Vercel's accessibility, performance, UX, interaction, and responsive-design guidance.