What do you understand by components props in Vue.js?

In Vue.js, every component instance has its own isolated scope. So, you cannot directly reference parent data in a child component’s template.

Props are used to pass down data to the child components. 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.

  1. Vue.component(‘blog-post’, {  
  2.   // camelCase in JavaScript  
  3.   props: [‘postTitle’],  
  4.   template: ‘<h3>{{ postTitle }}</h3>’  
  5. })