Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
this.props.dispatch is undefined if using mapDispatchToProps #255
I don't think it would be better.
Indeed, you can bring it back yourself :-). It's just that default
Hmm, I think I found a way:
Is this the recommended way to both bind action creators to dispatch as well as get the dispatch function in your component?
Following tnrich's answer, if I don't use spread operator, and pass dispatch as an argument like this, it still works.
Is using a spread operator mandatory here like this?