title: react-redux: Call multiple apis parallely on componentDidMount
body: <p><strong>I need to call two apis parallely</strong>. And this is important as I want to keep the time for the <code>page to load</code> to minimum. </p>
  
  <ol>
  <li><p>If I call the two apis (like below) in <code>componentDidMount</code> then would it be asynchronous or not. </p></li>
  </ol>
  
  <pre><code>class Test extends Component{
    constructor(args) {
              super(args)
              this.state = {
                 ...
              };
              ...
          }
  
          componentDidMount() {
              //api1() and api2() are like .get(url).then()
              this.props.dispatch(actions.api1())     
              this.props.dispatch(actions.api2())
          }
      }</code></pre>
  
  <hr>
  
  <p><strong>Would call to api1() and api2() will be done in parallel or synchronously?And how can I do that parallely</strong></p>
  
  <hr>
  
  <ol start="2">
  <li>I would also like to mention that my application uses <code>redux-thunk</code> something like below but I am not exactly sure what this code is exactly doing. I have read <a href="https://redux.js.org/api-reference/applymiddleware" rel="nofollow noreferrer">https://redux.js.org/api-reference/applymiddleware</a> that by applying middleware we can make <code>dispatch</code> work asynchronously.</li>
  </ol>
  
  <pre><code>
  import { createStore, applyMiddleware, compose } from 'redux'
  import thunk from 'redux-thunk'
  import { createLogger } from 'redux-logger'
  import axios from 'axios'
  import { routerMiddleware } from 'react-router-redux'
  
  import InitialState from './InitialState'
  
  
  const middleware = [ thunk.withExtraArgument(axios), routerMiddleware(history) ]
  
  /* eslint-enable no-undef */
  
  const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
  
  const store = createStore(
      rootReducer,
      InitialState,
      composeEnhancers(applyMiddleware(...middleware))
  )
  
  export default store
  </code></pre>