How to get started with Vue in under a minute?
How to get started with Vue in under a minute?
0. Open notepad
1.Import Vue
<script src='https://unpkg.com/vue@3'></script>
2.Create a html div to capture the output from Vue
<div id='app'>{{ output }}</div>
3.Create a Vue instance inside script tags and set the data to be returned to the div
<script>
const vue = Vue.createApp({
data(){return{output: 'hello world from vue'}}
})
</script>
4.Mount the instance
vue.mount('#app')
Comments