Answer the question
In order to leave comments, you need to log in
Is it the right decision to apply mixins in the form of adding categories?
Hello, I have a component form-category
in it there is a form for adding a category and the logic is all there (validation, additional components for the form, etc.) I decided to use this component when editing categories, but I ran into such a problem when the category was successfully added then I clear the form, and when editing, I would not like to clear the form when the category is successfully edited, and most likely I would still encounter a lot of functions that I would not like to perform when editing, so I decided to take the general functionality of editing, adding to mexin (validation and etc.), and after that create a new component for example form-category-update
and use it for editing.
The result is:
form-category
- a component adding a category and a mixin with common functionality (validation, etc.) is connected to itform-category-update
- a category editing component and a mixin with common functionality is connected to it...form-category
and to form-category-update
. form-category
and in form-category-update
. Thank you in advance for your response.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question