Created
January 1, 2020 16:56
-
-
Save duke79/2aa145153a29c0f14858f568590916b2 to your computer and use it in GitHub Desktop.
Redux in 30 seconds {PART 3}
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) { | |
props.dispatch('MY_ACTION_STRING', {/*some data*/}); | |
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