Vue.js is a JavaScript framework. Vue.js it builds dynamic user interfaces and single-page applications, on top of standard HTML, CSS and JavaScript, and provides a declarative and component-based programming model that helps you efficiently develop user interfaces, be it simple or complex.
Here is a minimal example :
import { createApp } from 'vue'
createApp({
data() {
return {
count: 0
}
}
}).mount('#app')
<div id="app">
<button @click="count++">
Count is: {{ count }}
</button>
</div>
Result :
The above example demonstrates the two core features of Vue :
Declarative Rendering : Vue extends standard HTML with a template syntax that allows us to declaratively describe HTML output based on JavaScript state.
Reactivity : Vue automatically tracks JavaScript state changes and efficiently updates the DOM when changes happen.