fix: connected components should recompute store props properly

This commit is contained in:
Géry Debongnie
2019-04-04 15:49:18 +02:00
parent 8badcbd21e
commit f2fc20f8e3
2 changed files with 34 additions and 0 deletions
+6
View File
@@ -30,6 +30,12 @@ export function connect(mapStateToProps) {
super.willUnmount();
}
updateProps(nextProps, forceUpdate) {
if (this.__widget__.ownProps !== nextProps) {
this.__widget__.currentStoreProps = mapStateToProps(
this.env.store.state,
nextProps
);
}
this.__widget__.ownProps = nextProps;
const mergedProps = Object.assign(
{},