Answer the question
In order to leave comments, you need to log in
How to use VUE components correctly?
Please explain, let's say I'm making an application in which there is a certain form that sends data, will it be correct to put this form into a separate component? The form will only be used in one section.
Or is it more correct to use components only where this component will be in the application more than once in different areas?
Answer the question
In order to leave comments, you need to log in
I try to divide into components. Now the form is used in one place, with the growth of the application it will be needed in others (I used to do so often). Plus, the components are easier to work with. Do not edit the sheet, but pass only what is needed to the component and visually refactor without hidden errors.
In the recommendations section of the official documentation, there is an explanation on naming, which in my opinion gives an understanding of how to use components:
Naming components
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question