[Vuejs]-How do I get the return observer object value from Vuex getters?

0๐Ÿ‘

  computed: {
    sampleId() {
      return this.$store.getters['samples/all'].sample.sampleId
    }
  }

or

  computed: {
    ...mapGetters('samples/all', ['sample']),
    sampleId() {
      return this.sample.sampleId
    }
  },
  

Leave a comment