Skip to content

Instantly share code, notes, and snippets.

@Dman757
Last active September 25, 2018 21:01
Show Gist options
  • Save Dman757/9b20e3b095d8f1491c552d40f7c0157f to your computer and use it in GitHub Desktop.
Save Dman757/9b20e3b095d8f1491c552d40f7c0157f to your computer and use it in GitHub Desktop.
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