Skip to content

Instantly share code, notes, and snippets.

@brookslyrette
Created February 26, 2017 13:24
Show Gist options
  • Select an option

  • Save brookslyrette/6eaa20c329525e23db60c96f9b186190 to your computer and use it in GitHub Desktop.

Select an option

Save brookslyrette/6eaa20c329525e23db60c96f9b186190 to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux';
import Counter from '../components/Counter.js';
const mapStateToProps = state => ({
count: state
})
const mapDispatchToProps = (dispatch) => ({
increment: () => { dispatch({ type: 'INCREMENT' }) },
decrement: () => { dispatch({ type: 'DECREMENT' }) },
reset: () => { dispatch({ type: 'RESET' }) },
})
export default connect(mapStateToProps, mapDispatchToProps)(Counter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment