[Vuejs]-How to get value from state as my vuex getter is returning empty value in observer

0👍

Because initially the store variable is empty.The values are itself set in the mutation.Hence showing up after mutation is called.

Well now to get data after mutation is fired use async await in your method as below:

async onChange(product) {
      await this.productBasedListings( product.id ).then(() => {
      console.log('LIST:', this.listingContracts); 
      })
},

Leave a comment