title: How to use non-namespaced and namespaces modules at the same time in Vuex
body: <p>I'm trying to have a state that consists of namespaced modules and a global state. Unfortunately, I can access the global actions but I can't get the global state properties.</p>
  
  <p>If I try to use mapState in a component like this,</p>
  
  <pre><code>computed: {
    ...mapState(['editMode']),
    ...mapState('address', ['addresses']),
  }
  </code></pre>
  
  <p>I have access to addresses, but editMode is always undefined. Mapping actions works flawlessly and updates the state according to the Vuex Chrome Tool.</p>
  
  <p>But I noticed, that the global state is shown under its own "namespace" "global". So I tried to map using ...mapState('global', ['editMode']), but got an error that the namespace does not exist.</p>
  
  <p>Here's my code:</p>
  
  <p>index.ts</p>
  
  <pre><code>import Vue from 'vue';
  import Vuex from 'vuex';
  import address from './modules/address';
  import global from './global';
  
  Vue.use(Vuex);
  
  export default new Vuex.Store({
    modules: {
      address,
      global,
    },
  });
  </code></pre>
  
  <p>modules/address.ts</p>
  
  <pre><code>export default {
    namespaced: true,
  
    state: {
      addresses: [],
    },
  
    mutations: {
      ...
    },
  
    actions: {
      ...
    },
  };
  </code></pre>
  
  <p>global.ts</p>
  
  <pre><code>export default {
    namespaced: false,
  
    state: {
      editMode: 0,
    },
  
    mutations: {
      SET_EDIT_MODE(state, value) {
        state.editMode = value;
      },
    },
  
    actions: {
      setEditMode({ commit }, editMode) {
        commit('SET_EDIT_MODE', editMode);
      },
    },
  };
  </code></pre>