Last active
September 25, 2018 21:01
-
-
Save Dman757/9b20e3b095d8f1491c552d40f7c0157f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mapStateToProps = ({ account }) => { | |
return { | |
accountId: account.accountId, | |
email: account.email, | |
name: `${account.firstName} ${account.lastName}`, | |
}; | |
}; | |
const mapDispatchToProps = dispatch => ({ | |
loadAccount: bindActionCreators(actions.account.fetchAccount, dispatch), | |
}); | |
const mergeProps = (stateProps, dispatchProps, ownProps) => { | |
return { | |
...stateProps, | |
...dispatchProps, | |
// ...ownProps | |
} | |
} | |
export default connect(mapStateToProps, mapDispatchToProps, mergeProps)(PresentationComponent)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment