by vercel-labs
使用布尔属性构建 React 组件会导致代码难以维护。本技能提供人工智能就绪的指南,包括复合组件、状态提升和内部组合,以创建可扩展的组件架构。
1. 打开 Claude 聊天界面
2. 点击下方 "📋 复制" 按钮
3. 粘贴到 Claude 聊天框中并发送
4. 输入 "使用 vercel-composition-patterns 技能" 开始使用
=== vercel-composition-patterns 技能 === 作者: vercel-labs 描述: 使用布尔属性构建 React 组件会导致代码难以维护。本技能提供人工智能就绪的指南,包括复合组件、状态提升和内部组合,以创建可扩展的组件架构。 使用方法: 1. 调用技能: "使用 vercel-composition-patterns 技能" 2. 提供相关信息: 根据技能要求提供必要参数 3. 查看结果: 技能会返回处理结果 示例: "使用 vercel-composition-patterns 技能,帮我分析一下这段代码"
这种方法适用于所有 Claude 用户,不需要安装额外工具。
productivity
safe
A structured repository for React composition patterns that scale. These patterns help avoid boolean prop proliferation by using compound components, lifting state, and composing internals.
rules/ - Individual rule files (one per rule)
_sections.md - Section metadata (titles, impacts, descriptions)_template.md - Template for creating new rulesarea-description.md - Individual rule filesmetadata.json - Document metadata (version, organization, abstract)AGENTS.md - Compiled output (generated)architecture-avoid-boolean-props.md - Don't add boolean props to customize
behaviorarchitecture-compound-components.md - Structure as compound components with
shared contextstate-lift-state.md - Lift state into provider componentsstate-context-interface.md - Define clear context interfaces
(state/actions/meta)state-decouple-implementation.md - Decouple state management from UIpatterns-children-over-render-props.md - Prefer children over renderX propspatterns-explicit-variants.md - Create explicit component variantsrules/_template.md to rules/area-description.mdarchitecture- for Component Architecturestate- for State Managementpatterns- for Implementation PatternsCRITICAL - Foundational patterns, prevents unmaintainable codeHIGH - Significant maintainability improvementsMEDIUM - Good practices for cleaner codeView Count
0
Download Count
0
Favorite Count
0
Quality Score
71