One of the top complaints among people using and learning Redux is “all the boilerplate.” And they’re not wrong… you really can end up with a lot of code across a lot of files – action constants, action creators, reducers, initializing it all, and then wiring up the components with mapStateToProps and mapDispatchToProps.
That last one, though, mapDispatchToProps , is what I want to talk about here. Specifically – why you might not need that function, and what you can replace it with instead.
Read more
|