September 2018
Intermediate to advanced
328 pages
9h 10m
English
A Vue component is simply a file with an exported object containing properties that define how that component should look and behave. The properties must be given names that adhere to the Vue API. You can read about these properties and other aspects of the Vue API at https://vuejs.org/v2/api. The following code represents an example component containing the elements of the Vue API used in this application:
import SomeComponent from './SomeComponent.js';export default { name: 'dummy-component', // Props passed from other components: props: { label: String, }, // Other Vue components to render within the template: components: { SomeComponent }, // Used to store local data/state: data() { return { amount: 0 ...Read now
Unlock full access