Answer the question
In order to leave comments, you need to log in
How to pass component by reference in production build?
Good afternoon.
I have a list of routes as an array:
[
{ path: '/', component: components.AppComponent, exatct: true, tag: Route },
{ path: '/dashboard', component: components.DashboardComponent, exatct: true, tag: PrivateRoute }
]
let rendered = routes.map((a, idx) => {
const Tag = a.tag;
const props = a;
return <Tag {...props} />
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question