Props are custom attributes you can register on a component. When a value is passed to a prop attribute, it becomes a property on that component instance. You can pass those list of values as props option and use them as similar to data variables in template.
1 2 3 4 | Vue.component('todo-item', { props: ['title'], template: '<h2>{{ title }}</h2>' }) |
Once the props are registered, you can pass them as custom atrtributes.
1 | <todo-item title="Learn Vue conceptsnfirst"></todo-item> |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.