Can a Vue.js component be called by using a variable name?
The components are registered like this:
import Component1 from 'component1'
import Component2 from 'component2'
import Component3 from 'component3'
...
components: {
Component1, Component2, Component3
},
I am exploring the possibility of something like this:
created() {
var componentName = 'Component1';
this.components[componentName]
}