以 ProductReview Effect 为例,代码里使用了 ProductActions:

这个 productAction 是从一个 index.ts 里导入的:

index.ts 首先从一个叫做 product-group.actions.index 的文件里导入所有 action,然后再导出:

product-group.actions.index: 又导出了四个文件:

其中 product.action 和 页面 Product 数据加载逻辑有关。 而单个的 product action,负责定义 action 类和 action 常量字符串:

更多Jerry的原创文章,尽在:“汪子熙”:
