What is Vue.js?
Vue.js (pronounced as view) is a progressive JavaScript framework used for building user interfaces and single-page applications (SPAs). It was created by Evan You in 2014 and has since become one of the most popular front-end frameworks, alongside React and Angular.
The word “progressive” means you can use Vue for small parts of a website (like a widget) or scale it up to build large, complex web applications.
Why Use Vue.js?
✅ Easy to Learn – Beginner-friendly compared to React or Angular.
✅ Lightweight – Small size (~20KB) but powerful.
✅ Reactive Data Binding – UI updates automatically when data changes.
✅ Component-Based – Applications are built with reusable components.
✅ Great Documentation – Vue has one of the best and most detailed docs.
✅ Flexibility – Can be used for simple projects or enterprise apps.
Basic Vue.js Example
Here’s a very simple Vue.js code example:
Vue Example
{{ message }}
Output:
Displays Hello, Vue.js!
On button click → message reverses to !sj.euV ,olleH
Core Features of Vue.js
Reactive Data Binding
Uses {{ }} syntax to bind data to the DOM.
Directives
Special attributes starting with v- like v-if, v-for, v-model.
Now you see me
Components
Reusable, self-contained building blocks.
Vue.component('todo-item', {
props: ['todo'],
template: '