React 容器与展示组件
原名:react-container-presentation-component
按容器和展示职责拆分 React 组件,减少数据逻辑与界面耦合。
中文 Skills 技能说明
适合组件状态复杂或需要提高复用性时使用。先判断拆分是否真正降低复杂度,再按项目目录和类型约定生成文件;不为套模式制造多余层级。
上游能力依据
上游原始适用说明:Create a React component using the Container/Presentation pattern in src/components by asking for the component name and type (ui or features), then scaffold files that follow this repository's TypeScript, Storybook, and SCSS conventions. Use when the user explicitly asks for a Container/Presentation-based component or runs /react-container-presentation-component.
上游 SKILL.md 主要章节(保留原文标题):
- When To Use
- Required Questions
- Procedure
- Output Contract
使用边界
先读取项目约定、依赖版本和现有测试,再提出最小改动。写文件、运行脚本、提交代码或发布前应检查差异并保留回退路径。
作者、翻译与许可证
- 原作者
- GitHub, Inc. 与 awesome-copilot contributors
- 中文翻译
- CEOFans翻译
- 许可证
- MIT
- 上游来源
- https://github.com/github/awesome-copilot/tree/3f0bba475ec40b9680e1d0311b9caffeec5ad4c3/skills/react-container-presentation-component
适用范围
平台:linux、macos、windows;标签:软件开发、React 容器与展示组件
安全提示
基础静态扫描不等于绝对安全。技能可能调用命令、浏览器、云服务或本地文件,请在最小权限环境中使用,高风险操作必须人工确认。
如发现侵权、许可证或安全问题,可在本页前台提交投诉,管理员复核后可立即下架。