vue.js 3 code example
Example 1: vue 3
<script src="https://unpkg.com/vue@next"></script> # CDN Version
# NPM or Yarn Version
npm install vue@next
#Vue 3 CLI Installation
yarn global add @vue/cli
# OR
npm install -g @vue/cli
# Vue CLI Create Project
vue create my-project
Example 2: vuejs
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
}
})
Example 3: vuejs
const CounterApp = {
data() {
return {
counter: 0
}
},
mounted() {
setInterval(() => {
this.counter++
}, 1000)
}
}