function mapStateToProps(state) {
return { todos: state.todos }
}
function mapDispatchToProps(dispatch) {
return { actions: bindActionCreators(actionCreators, dispatch) }
}
export default connect(mapStateToProps, mapDispatchToProps)(TodoApp)
why would i use mapDispatchToProps and bindActionCreators as second prop if
export default connect(mapStateToProps, { getSthAction })(TodoApp)
this way it works as well? is there any difference?