Subscribe on changes!

created() not called when using mixins with extends

avatar
Mar 13th 2021

Version

3.0.7

Reproduction link

https://codesandbox.io/s/wonderful-wing-etp2p?file=/src/components/HelloWorld.vue

Steps to reproduce

  1. Open the Sandbox link
  2. Check the console log Here is a brief code:
const BaseA = {
  created() {
    console.log("created A");
  },
};

const MixinB = {
  mixins: [BaseA],
  created() {
    console.log("created B");
  },
};

export default {
  name: "HelloWorld",
  props: {
    msg: String,
  },
  extends: MixinB,
};

What is expected?

console output:

created A
created B

What is actually happening?

console output:

created B

function created() not called

avatar
Mar 13th 2021

This is the same as vue-class-component issue#514 https://github.com/vuejs/vue-class-component/issues/514