Created
May 13, 2018 03:43
-
-
Save radiegtya/7d914b8ff254ed92dfb1308e52024af8 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
class Profiles extends Component { | |
// ... THE REST OF CLASS CODE | |
} | |
// #1. make const named mapStateToProps to mapping our state, to object called profiles | |
// the state is called profilesReducer because we got it from the profile reducers that we made earlier | |
const mapStateToProps = (state)=>({ | |
profiles: state.profilesReducer | |
}) | |
// #2. connecting redux with Component, we use "connect" from "react-redux" library to do this, don't confuse with the syntax | |
export default connect(mapStateToProps)(Profiles) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment