Encapsulating Components and Business Logic
Learn how to handle components that are used in the route components.
We'll cover the following...
We discussed how to handle route components for the product feature, but this isn’t the end. So, the next question is, how do we handle components that are used in the route components?
Example
Let’s take AddProduct.vue
and EditProduct.vue
as an example. Both need a form
component to allow a user to enter product details. Let’s assume that forms on both pages are so similar that we can reuse one instead of creating two form
components. Where do we put the ...