implementSplit
使用说明
- 读取 generate-preview 生成的预览文档(
.temp.json和.temp.md) - 参照 use-store-not-props-best-practice:分析数据流,识别可从 store 获取的数据
- 创建子组件文件,确保每个子组件直接从 store 获取所需数据
- 更新主组件,移除透传的 props
- 生成
index.ts导出文件
重要: 数据优先从 Zustand store 获取,避免 props 透传;每个子组件职责单一
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.
.temp.json 和 .temp.md)index.ts 导出文件重要: 数据优先从 Zustand store 获取,避免 props 透传;每个子组件职责单一