fix: 修复 xxxOn 在 store 里面可能不更新的问题 (#5721)

This commit is contained in:
liaoxuezhi 2022-11-08 22:17:29 +08:00 committed by GitHub
parent a9379b27c6
commit f467b0b264
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,11 +134,16 @@ export function HocStoreFactory(renderer: {
this.unReaction = reaction(
() =>
JSON.stringify(
getExprProperties(rest, store.data, undefined, rest)
getExprProperties(this.props, store.data, undefined, this.props)
),
() =>
this.setState({
...getExprProperties(rest, store.data, undefined, rest)
...getExprProperties(
this.props,
store.data,
undefined,
this.props
)
})
);
}