Created
January 1, 2020 16:42
-
-
Save duke79/c6f482d084ce9b07b3f4233ac20a3f87 to your computer and use it in GitHub Desktop.
Redux in 30 seconds {PART 2}
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 { connect } from 'react-redux'; | |
const = MyComponent => (props) { | |
console.log(props.reduxState); | |
return null; | |
} | |
const mapStateToProps = function(state) { | |
return { | |
reduxState: state, | |
} | |
} | |
export default connect(mapStateToProps)(MyComponent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment