• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in Vue.JS by
Q:
Why do we need local registration?

1 Answer

0 votes
by

Global registration often isn’t ideal. For example, if we are using a build system like Webpack, globally registering all components means that even if we stop using a component, it could still be included in our final build. This unnecessarily increases the amount of JavaScript your users have to download. In these cases, you can define your components as plain JavaScript objects:

Then define the components you’d like to use in a components option:

Related questions

0 votes
asked Oct 9, 2019 in Vue.JS by Indian
0 votes
asked Oct 9, 2019 in Vue.JS by Indian
...