1.

What causes prop drilling in Vue.js?

Answer»
  • Prop drilling - props are used to pass data from parent to CHILD. The use of props is effective until deep chaining of components is encountered.  
  • Prop drilling is caused when a distant component in a LARGE component tree and a deeply nested component want something from a distant ancestor component. In this case, all of the intermediate components should have to pass props from the distant ancestor across the entire chain. 
  • It involves the PASSING of props ALONG the entire chain for the distant component to use the data. 
  • It is difficult to maintain, PRONE to bugs, and is hard to work. 


Discussion

No Comment Found

Related InterviewSolutions