vercel-composition-patterns

仓库创建 2026年7月6日最近提交 23 天前SkillHot 收录 22 天前
▸ 精选理由

帮助减少 boolean prop 泄洪,适合组件库与重构场景。

这个 Skill 做什么

提供可扩展的 React 组合模式与组件设计指导。

提供可扩展的 React 组合模式,帮你摆脱布尔 prop 泛滥,推荐 compound components、render props、context provider 等方案。在重构组件库或设计可复用 API 时使用,包含对 React 19 相关 API 的考虑。重点是提升可维护性和可复用性,让组件在团队中更好伸缩和协作。

▸ 展开 SKILL.md 英文原文

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组合模式组件设计通用
0
Stars
0
Forks
11
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/vivalsy/SDD_Template/main/.claude/skills/vercel-composition-patterns/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/vivalsy/SDD_Template/main/.claude/skills/vercel-composition-patterns/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# React Composition Patterns

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.

## When to Apply

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

## Rule Categories by Priority

| Priority | Category                | Impact | Prefix          |
| -------- | ----------------
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有