Static GitHub Issues

[243] Vuex Store with modules bug with mapGetters

prev: Code splitting in nuxt
next: How to get request in Vue plugins initialization

Using separate files for Vuex Store in Nuxt.js Pretty sure there is a bug in module getters (or I'm dummy which also happens a lot)

This works... ( in store/project.js )

{{ selected }}
...
computed: {
  selected () {
        return this.$store.state.projects.selected
  }...
}

this does not...

computed: {
     ...mapGetters('projects', ['selected'])
  }...
}

nor does this...

      ...mapGetters({
        selected: 'projects/selected'
      }),

nor this...

      ...mapGetters(['projects/selected']),

PS my getter is ... ( store.projects.js )

export const getters = {
  selected () {
    return state.selected
  }

I've gotten this to work in plain vue/vuex so maybe I'm just messing up the NuxtJS syntax?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c209">#c209</a>)</em></sub></div>