redux-devtools/packages/redux-devtools-remote/examples/counter/containers/App.js

17 lines
432 B
JavaScript
Raw Normal View History

2021-10-28 23:39:47 +03:00
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Counter from '../components/Counter';
import * as CounterActions from '../actions/counter';
function mapStateToProps(state) {
return {
counter: state.counter,
};
}
function mapDispatchToProps(dispatch) {
return bindActionCreators(CounterActions, dispatch);
}
export default connect(mapStateToProps, mapDispatchToProps)(Counter);