[Vuejs]-Make selected item current

0👍

I would use mapState to effectively watch the value in the store that is being updated by this.$store.dispatch(RoomTypes.JOIN_ROOM, room);

So in a component that needs to know this value:

 computed: {
    ...mapState(['STORE_NAME', 'STORE_VALUE']),
  },

and then you should be able to use this.STORE_VALUE as a dynamically updated value

Leave a comment