[Vuejs]-How can I refresh computed property

0👍

pullData is an async action, so it already returns a Promise. You’d have to await its result before retrieving it from getData:

import { mapActions, mapGetters } from 'vuex'

export default {
  async mounted () {
    await this.pullData()
    this.someData = this.getData
  },
  computed: {
    ...mapGetters(['getData'])
  },
  methods: {
    ...mapActions(['pullData'])
  }
}

Leave a comment