Little more
May be you want a little more, I want a member that keep watching the changes for me and update UI instantly. That would be awesome !
The computed property will help us. These ares functions which return/ set values. So there can be setter / getter functions which is an observer for other members.
<script >
data(){
return {
counter:0;
}
computed(){
Counter(){return counter);
}
}
</script>
<template>
<div >
{{Counter}}
</div>
</template>
Here the member Counter will automatically update the UI for you when any changes detected on counter.
There are more about Vue to explore
- How reactivity works in Vuejs - How to use reactive feature in Vuejs
- Create a desktop version of Quasar-Vue app using Electron - How to build desktop version of Quasar Vue app using Electron
- Create PolarArea chart component in Vue - How to Create a PolarArea Chart component in Vue using vue-chartjs module
- Create Radar component in Vue - How to Create a Radar Chart component in Vue using vue-chartjs module
- Create Horizontal Bar chart component in Vue - How to Create a HoruzotalBar Chart component in Vue using vue-chartjs module
- Create Scatter chart component in Vue - How to Create a scatter Chart component in Vue using vue-chartjs module
- Create Bubble chart component in Vue - How to Create a bubble Chart component in Vue using vue-chartjs module
- Quasar UI framework for Vue - About Quasar Vuejs UI framework and How to create and run Vuejs app with Quasar CLI tool
- Component with same name in Vuejs - How to dealing with component has same name in Vuejs
- Create Pie chart component in Vue - How to Create a Pie Chart component in Vue using vue-chartjs module