Getting started with Vue.js
Written in collaboration with Ragini Sharma
What is Vue.js?
Vue is an open source JavaScript library framework for building user interface and single-page applications; it is commonly referred to as Vue. This framework used high decoupling.
It was first released in February 2014. It was created by Evan you and maintained by him and rest of its active team members. It is open source so you can also contribute to it. In April 2021 Vue was upgraded to version 3.0.11 which is being considered as the most stable version till now.
Companies using Vue.js
As of now Vue.js is the 3rd most popular front-end framework in the market and it is being trusted by some of the largest companies like :-
- Apple
- Benance
- Trivago
- Gitlab
- Zoom
Google uses Vue for the career page careers.google.com.
Apple uses Vue for their Swift tutorial.
Difference between Vue, React and Angular
Installing Vue.js
There are 3 ways to use Vue for creating your project:-
- CDN
You can use vue.js from the CDN library in your application.
Just need to use this link https://unpkg.com/vue in script tag in your application.
- NPM
NPM is recommended when you want to create a large scale application using Vue.
Command to install Vue using NPM
- CLI Command Line
Command to install Vue.js using CLI
Creating “Hello World” application using Vue.js
- After installing Vue, You have to create Vue project using below command:-
Sample “Hello World” Vue Application Example
Open the project in any code editor and in the src folder create a page with a name like hello.vue.
Import this file in the main.js file in the src folder.
Run the project in code editor terminal using the below command:-