mcpField
S
store-best-practice

store-best-practice

github.com/forge-town开发739 次安装8 周前更新
代码仓库

关于 store-best-practice

使用 Zustand 创建或重构状态管理 Store 时必须遵循,确保遵循 slice 模式、Provider 设置和类型安全规范。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/forge-town/skills --skill store-best-practice

安装后在 Claude Code 中输入/store-best-practice确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

best-practice-examples/zustand-store/
appLayoutSlice.ts
appLayoutStore.ts
index.ts
provider.tsx
topBarSlice.ts
references/
checklist.md
store-best-practice-guide.md

README 原文English

来自项目 README

README 暂无中文译文,以下为英文原文;中文介绍见上方。

Store 最佳实践

使用说明

  1. 阅读 Store 最佳实践指南 了解设计规则
  2. 严格参照 best-practice-examples/ 中的代码结构生成代码
  3. 完成后使用 检查清单 逐项验证

重要: 实现时必须严格遵循 best-practice-examples 中的结构;Store 只负责跨组件共享状态,组件私有状态用 useState

评论

支持 Markdown