Created
December 26, 2017 23:36
-
-
Save rafaellucio/b601dbcc7fc2f138fb2016d1d592d9fc 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 { connect } from 'react-redux' | |
import Counter from './Counter' | |
const mapStateToProps = state => ({ count: state.count }) | |
const mapDispatchToProps = dispatch => ({ | |
increment: () => dispatch({ type: 'INCREMENT' }), | |
decrement: () => dispatch({ type: 'DECREMENT' }) | |
}) | |
export default connect(mapStateToProps, mapDispatchToProps)(Counter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment