0👍
You can use watch
to detect a value change, here’s an example:
let foo = new Vue({
el: '#vue-app',
data: {
roomTypes: @json($roomType),
rooms: @json($rooms),
members: @json($members),
},
methods: {},
watch: {
['rooms.roomType']() {
this.rooms.members = 1;
}
}
});
- [Vuejs]-How to enable Vuex in Firebase Functions when deploying Nuxt app
- [Vuejs]-Set listener on WebView | nativescript + vue
Source:stackexchange.com