import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { your action } from '../action/index.js'
your component ...
function mapDispatchToProps(dispatch) {
rerturn bindActionCreators({your action}, dispatch);
}
export default connect (null, mapDispatchToProps)(your container);
//null because we dont care about state?
// now you can use action as props above like: this.props.YourAction ...
//dont forget to export only connect and not your class
//dont forget to bind all methods to the correct object (this)
in your container:
Binding action to props