1.

What are fallthrough attributes in Vue.js?

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). 

We do not have to EXPLICITLY specify what is to be inherited in the inheriting component rather the attribute or the event passed will apply to the component without specifying its declaration in its component 

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>


Discussion

No Comment Found

Related InterviewSolutions