SKILL

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

原文 · 译文未通过检查

适用对象:React / Next.js。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • React Composition Patterns
  • When to Apply
  • Rule Categories by Priority
  • Quick Reference
  • 1. Component Architecture (HIGH)
  • 2. State Management (MEDIUM)
  • 3. Implementation Patterns (MEDIUM)
  • 4. React 19 APIs (MEDIUM)

Composition patterns for building flexible, maintainable React components. Avoid boolean prop proliferation by using compound components, lifting state, and composing internals. These patterns make codebases easier for both humans and AI agents to work with as they scale. Reference these guidelines when: Refactoring components with many boolean props Building reusable component libraries Designing flexible component APIs Reviewing component architecture Working with compound components or context providers | Priority | Category | Impact | Prefix | | -------- | ----------------------- | ------ | --------------- | | 1 | Component Architecture | HIGH | architecture- | | 2 | State Management | MEDIUM | state- | | 3 | Implementation Patterns | MEDIUM | patterns- | | 4 | React 19 APIs | MEDIUM | react19- | architecture-avoid-boolean-props - Don't add boolean props to customize behavior; use composition architecture-compound-components - Structure complex components with shared context state-decouple-implementation - Provider is the only place that knows how state is managed state-context-interface - Define generic interface with state, actions, meta for dependency injection state-lift-st

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
vercel-labs/agent-skills
源文件
skills/composition-patterns/SKILL.md
固定版本
1a2c79d4e6c4a2283dc2c614b6538cbe1ed5ca62
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:Vercel Agent Skills · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T14:01:38.329Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。