I've seen this a few times with redux code:
const mapDispatchToProps = (dispatch) => {
...
}
function mapStateToProps(state) {
...
}
Is there any reason why this is done, is it just a convention, a case of copy-paste code, or is there some benefit to doing it this way?
I've read that arrow functions vs regular functions automatically bind this, but it doesn't appear that these functions exist within a class at all, so maybe that makes no difference?