I have a component defined using Vue class components like so:
@Component
export default class MyComponent extends Vue {
value = 0;
}
I need to repeatedly instantiate this component as a root component with different data passed in each time. For example, I've tried doing this:
const vm = new Vue({
el: myElement,
render: (h) => h(MyComponent),
data: {value: 1},
});
But when I look at this.value in the component it is set to 0 instead of 1. Is there anyway for me to specify that I'd like the component to be instantiated with the value passed in when calling new Vue?