Hello! I have a restAPI that returns me a array
of names, I wanted to know how I do to get them as componentes
. Below is a better understanding:
import produtos from './produtos'
import artigos from './artigos'
var API_Request = ["produtos", "artigos"]
var router = [ ...API_Request ]
const app = new Vue({
router
}).$mount('#container')
API_Request
comes as string
, how do I convert it to components that were imported above?
Thank you!