-
Props and Data
- Data is the private memory of each component where you can store any variables you need.
- Props are how you pass this data from a parent component down to a child component.
- we can't change them.
-
Inheritance using
extends
- Full inheritance isn’t available within the design of Vue.
- The component system is purposely built to avoid components being coupled to one another.
-
extends
orv-slot
- I think... it's proper to use
extends
in the case that we need to override template or style, and only need to reuse the parent component's methods.- Use
extends
to reuse parent's methods.
- Use
- In case of
v-slot
which replacedslot
, it's proper to use in the case that we need to reuse template & style and customize them by inserting new items into the base template.
- I think... it's proper to use