I'm trying to create a nuxt.js component programmatically. I tried the approach below which works in Vue. But it doesn't seem to work in nuxt.js because it instantiates the component on the Vue object. So it can not access its parent's data.
var ComponentClass = Vue.extend(component_to_use);
var instance = new ComponentClass();
instance.$mount(); // pass nothing
this.$refs.container.appendChild(instance.$el);
I cant find I way to do this correctly in Nuxt.js. Does anybody know how to do this? Note: I know I can pass the data as a prop but this is inefficient.