title: React Redux Thunk with mapDispatchToProps
body: <p>Looking at examples of how to use <code>mapDispatchToProps</code> most examples follow the following pattern, a function that returns an object with <code>dispatch</code> as an argument:</p>
  
  <pre><code>const mapDispatchToProps = (dispatch) =&gt; {
      return({
          someFunc: (arg) =&gt; {dispatch(someFunc(arg))}
      })
  }
  </code></pre>
  
  <p>My question is, if all my actions are using <code>thunk</code>, meaning they all have access to <code>dispatch</code> anyway, why would i need to use the above example for mapping functions to props in my <code>containers</code> ? </p>
  
  <p>After experimenting i've figured out another way that seems to work, however im not sure if this is best practice... </p>
  
  <p><strong>Main.jsx</strong></p>
  
  <pre><code>import * as mainActions from '../actions/mainActions'
  import * as menuActions from '../actions/menuActions'
  
  const actionsToMap = {...mainActions, ...menuActions}
  export default connect(mapStateToProps, actionsToMap)(Main)
  </code></pre>
  
  <p>Is there anything wrong with this approach? </p>