title: Vuex access a module state while initializing the state of another module
body: <p>Let's say we have a store with two modules, A and B.</p>
  <p>All I need is:
  Access a state property of A while initializing the state of B.</p>
  <p>Accessing that property can be done with 'rootState' if the case was trying to access the property inside a getter, action or mutation.
  But how can I do that <strong>while initializing the state</strong>?</p>
  <p>Example:</p>
  <p>A.js</p>
  <pre><code>export default  {
     state:{
        x:5
     }
  }
  
  </code></pre>
  <p>B.js</p>
  <pre><code>export default  {
     state:{
        foo: 3+ (how to access A.x here?) // this should be 8
     }
  }
  
  </code></pre>
  <p>index.js would look something like this</p>
  <pre><code>import moduleA from './modules/A'
  import moduleB from './modules/B'
  
  new Vuex.Store({
      modules: {
          A: moduleA,
          B: moduleB,
      },
  })
  </code></pre>