Created
February 26, 2018 07:22
-
-
Save rohanBagchi/bef30749ea27ca6e4ae59e2b760de744 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import React from 'react'; | |
import { connect } from 'react-redux'; | |
const User = props => ( | |
<div> | |
{props.user.name} | |
</div> | |
); | |
function mapStateToProps(state) { | |
return { | |
user: state.user_reducer.user, | |
}; | |
} | |
export default connect( | |
mapStateToProps, | |
null | |
)(User); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment