Category: Udemy Notes

1. What is Vue?   2. New Features in Vue 3 The main improvements: Composition API with setup() function. Can have multiple root elements in a component Teleport component – render content from one component in a different place in the DOM Suspense component – support for asynchronous code Typescript support out of the box […]

  6. How to Use Vue Using the CDN Vue can be used in 2 ways: to create a single page web app or to make a component.  We’ll start with components. Create a file named index.html.  Use doc command to create template. Head to Vue.js documentation to grab the CDN for the Vue library […]

CDN <script src="https://unpkg.com/vue@3.0.2"></script> Mount Vue to HTML Element const app = Vue.createApp({ //data, functions, component template   }) app.mount('#app') Provide App Data const app = Vue.createApp({ data() { return { data-property: value  } } }) <p> {{ data-property }} </p> Register Event Listener: methods, v-on and @ const app = Vue.createApp({   methods: { foo() […]