Answer the question
In order to leave comments, you need to log in
How to build a project on Vue.js?
There were some general questions about Vue, which for some reason are omitted in the documentation.
1) Vue instance. It in the project (application, on the page) can be only one? If not, in what cases is it justified to use more than two copies.
2) Components.
Components are reusable Vue instances with their own name.What if I need a NOT reusable component with a global scope? An example is navigation in a SPA application. Is it still worth using the component mechanics? Or extend the root Vue instance and use a template?
Answer the question
In order to leave comments, you need to log in
1. There can be as many as you like. Justified in cases where you have 3 completely different calculators processed by vue on your site in different places, and nothing else.
2. If you have a very simple project, then it makes no sense to create a button component that will contain the same button, with some of your properties. Components are needed in the case, as you said, reuse. For example, your component can be some kind of post, some kind of comment, and so on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question