Pass state property via props (Vuex) Pass state property via props (Vuex) vue.js vue.js

Pass state property via props (Vuex)


Note the comment in the mapState example:

// to access local state with `this`, a normal function must be usedcountPlusLocalState (state) {  return state.count + this.localCount}

You are using arrow functions.

As for this.module, I think you're going to have to forego the binding helper notation and explicitly put the module reference into the definitions. I'm guessing that looks like:

computed: mapState(this.module, {  title(state) {    return get(`${state}.${this.module}`, `${this.section}.title`);  },  message(state) {    return get(`${state}.${this.module}`, `${this.section}.message`);  }})