Take a look at this illustration :
mixin.js
export default {
methods : {
myFunction() { // Some action goes here }
}
}
component.vue
import mixin from './mixin'
export default {
mixins : [ mixin ]
created() {
// Invoke myFunction defined in the mixin here
}
}
I am aiming to call the myFunction that is located inside the methods of mixin from the created() lifecycle method within the component.