I would actually suggest that you not try to do that. Unless you have a very specific need to make use of
dispatch in an unusual way, I'd encourage you to just use the object shorthand syntax that
connect supports. If you pass an object full of action creators as the second argument to
connect, it will automatically run that object through
bindActionCreators for you. So, in this case it would be
export default connect(mapState, LayerActions)(App).
I do see that you're returning the results of that call as a prop named
actions. I started off doing that myself, but eventually switched away from it, as it required some of my components to "know" that they were connected to Redux (ie, having to call
this.props.actions.someActionCreator() instead of
I wrote an article called Idiomatic Redux: Why use action creators? that covers some of these topics in more detail.