Created
May 5, 2016 09:07
-
-
Save pjazdzewski1990/587188f62d6f9364e65ac80eaf311d89 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
const mapStateToProps = (state) => { | |
return {counter: state.counter}; | |
} | |
const mapDispatchToProps = (dispatch) => { | |
return { | |
onIncrement: () => dispatch({type: 'INCREMENT'}), | |
onDecrement: () => dispatch({type: 'DECREMENT'}) | |
} | |
} | |
Counter = connect(mapStateToProps, mapDispatchToProps)(Counter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment