[Vuejs]-Vuex โ€“ getters dynamically based on data property

1๐Ÿ‘

โœ…

You could use brackets accessor :

rawData(){
  return this.$store.getters['get'+this.dataName]
}

rawData should be a computed property and 'get'+this.dataName has to be in your getters like getTodos

Leave a comment