Back to skills
extension
Category: Development & EngineeringNo API key required

implement-split

Based on the preview document and Best Practices, actually split the component code to generate sub-components that comply with the specifications. Prioritize obtaining data from the store to avoid prop drilling.

personAuthor: jakexiaohubgithub

implementSplit

使用说明

  1. 读取 generate-preview 生成的预览文档(.temp.json.temp.md
  2. 参照 use-store-not-props-best-practice:分析数据流,识别可从 store 获取的数据
  3. 创建子组件文件,确保每个子组件直接从 store 获取所需数据
  4. 更新主组件,移除透传的 props
  5. 生成 index.ts 导出文件

重要: 数据优先从 Zustand store 获取,避免 props 透传;每个子组件职责单一