I've been using @connect
annotation for some time and decide to switch to mapStateToProps
and mapDispatchToProps
.
I can mapStateToProps
to map store to component's props fine but wondering what's the point of mapDispatchToProps
when I can just call this.props.dispatch( xxx )
anywhere.
I also see some react repos and they also do not use mapDispatchToProps
Sorry if it sounds like a beginner question.