```
class City extends Component {
// static propTypes = {
//
// }
componentDidMount() {
console.log(this.props.userInfo) // 这个显示空对象
console.log(this.props.userInfoActions) // 这个显示正常
}
render() {
return(
<div>
<Header />
</div>
)
}
}
function mapStateToProps(state) {
return {
userInfo: state.userInfo
}
}
function mapDispatchToProps(dispatch) {
return {
userInfoActions: bindActionCreators(userInfoActionsFromOtherFile,dispatch)
}
}
export default connect(mapStateToProps, mapDispa
```