i'm using react-toolbox and tabs.
i would like to make an object like:
var Tabs = [
{
value: 0,
label: 'First Tab',
componentName : "MyAwesomeComponent"
},
{
value: 1,
label: 'Second Tab',
componentName : "MyOtherAwesomeComponent"
}
]
and then, in render's return function
<Tabs index={this.state.tabs.index} onChange={this.tabs.handleChange}>
{this.Tabs.map((item,index) => (
<Tab label={item.label}>
**** Here, i want to call {item.componentName} component. ***
</Tab>
))}
</Tabs>
is this possible to call component by name?
Thanks a lot.