Can I mapDispatchToProps without mapStateToProps in Redux? Can I mapDispatchToProps without mapStateToProps in Redux? reactjs reactjs

Can I mapDispatchToProps without mapStateToProps in Redux?


Yes, you can. Just pass null as first argument:

AddTodo = connect(    null,    mapDispatchToProps)(AddTodo)

Yes, it's not just acceptable practice, it's recommended way to trigger actions. Using mapDispatchToProps allows to hide the fact of using redux inside your react components