Answers for "vue store getters send value to getter"

0

vue store getters send value to getter

// generally getter does not take arguments, but there is an option to use method style getters
// Example to method style getter:

new Vuex.Store({
  getters: {
    someMethod: (state) => (id) => {
        return state.things.find(thing => thing.id === id)
      }
    };       
  }
})
Posted by: Guest on August-09-2021

Browse Popular Code Answers by Language