Access State inside of mapDispatchToProps method
问题 I have written a container component using redux and my implementation for mapDispathToProps looks like this const mapDispatchToProps = (dispatch, ownProps) => { return { onChange: (newValue) => { dispatch(updateAttributeSelection('genre', newValue)); dispatch(getTableData(newValue, ownProps.currentYear)); } } } The problem is that in order to getTableData i need the state of some other components. How can I get access to the state object in this method? 回答1: You can use redux-thunk to create