Answer» - Fallthrough attributes are v-on event listeners or attributes which are passed to other components implicitly. This means it does not involve the explicit DECLARATION of the attribute or event in the receiving component’s props (from parent to child) or emit (from child to parent).
- Props is an option in the parent component to list what PROPERTIES of the child are to be ACCESSED by the parent. So, it is down-way referencing unlike emit. In the parent component properties to be accessed are listed so that the child component can use those properties as an attribute name and assign a value when referencing the child instance.
- Emit is used to emit custom events in template expressions directly. They are used in up-way binding from parent to child so that the parent performs some modification on the value passed to it by the child component. ‘$emit’ specifies the event name and optional value to be passed to the event which will be accessed by the parent component where some logic will be performed on it.
What MAKES the fallthrough attributes unique is - Example <!-- template of <Button1> -->
<BUTTON>click here</button>
<Button1 class="large" /> //included in another component
<!-- final render of template of <Button1> after fallthrough attribute -->
<button class="large">click here</button>
|