Vue
One Day Introduction to Vue.js with Hassan Djirdeh

Components & Single-File Components

PRO

In this lesson, Hassan teaches about components and single-file components. Students will more specifically be introduced to:

  • Vue Components: self-contained modules that can group markup, logic, and even styles.
  • Global Components: Vue.component( 'name-of-component', { });
  • Component Variables: const nameOfComponentObject = { };
  • Single-File Components: allow us to define HTML/CSS and JS of a component within a single .vue file
  • Props (data): can be passed downwards in a single direction (parent --> child, etc.)
  • Setting up a webpack-based project using the Vue-cli, which can help facilitate the rapid building and developing of Vue applications