import {connect} from 'react-redux'; import {changeStrokeWidth} from '../reducers/stroke-width'; import StrokeWidthIndicatorComponent from '../components/stroke-width-indicator.jsx'; const mapStateToProps = state => ({ strokeWidth: state.scratchPaint.color.strokeWidth }); const mapDispatchToProps = dispatch => ({ onChangeStrokeWidth: strokeWidth => { dispatch(changeStrokeWidth(strokeWidth)); } }); export default connect( mapStateToProps, mapDispatchToProps )(StrokeWidthIndicatorComponent);