[Vuejs]-VUEX Update data model with Computed mapGetters

3👍

To listen to changes you can use watch like this:

  computed: {
    ...mapState(["user", "setUploadedImageUrl"]),
    ...mapGetters(['rewardsImageUrl'])
  },
  watch:{
      setUploadedImageUrl(){
        console.log('setUploadedImageUrl changed', this.setUploadedImageUrl)
      },
  },
👤Raeisi

Leave a comment