It not a good practise,you should alway use mixin as you can.
- Say that your have a 3rd party component fits your need 90%
- Only a bit of code you want to customize, maybe just the html layout
- The component doesn't have a option for that
- the component is a '.vue' import by
vue-loader
so you can'tOtherComponent.extend
import OtherComponent from 'OtherComponent'
Vue.extend(OtherComponent).extend({
methods: codeThatDoesNotFitYourNeed(){
// customize code
}
})