You use props to allow a component to receive input from its parent. Props are immutable in the child component and are defined as part of the component definition object as shown in the following code:
<script>
export default {
name: 'Child',
props: {
greet: String,
},
}
</script>
In the preceding code, the Child component expects an input from its parent, specifically, a prop named greet of the type String.
Props support more definitions, such as default values and validation.
You can read more about it here: https://vuejs.org/v2/guide/components-props.html.
You can read more about it here: https://vuejs.org/v2/guide/components-props.html.