我似乎很难理解处理多家商店的文档。这个在我的应用组件里..。
static getStores() {
return [InventoryStore, CompanyInfoStore];
}
static getPropsFromStores() {
return {
...InventoryStore.getState(),
...CompanyInfoStore.getState()
};
}
componentDidMount() {
const clientId = this.state.clientId;
InventoryActions.getAll(clientId);
CompanyInfoActions.getAll(clientId);
}InventoryActions没有被“击中”,我的props.items中唯一的项目是公司信息。
有人知道怎么纠正吗?
非常感谢!
发布于 2016-03-06 17:05:10
我也有过同样的问题。也许它能帮你找到我做的解决方案。我不会加入商店里的房产,我对每一家都使用单独的。
static getPropsFromStores() {
return {
inventory: InventoryStore.getState(),
company: CompanyInfoStore.getState()
};
}希望它能帮到你。
https://stackoverflow.com/questions/33835186
复制相似问题