|
|
|
|
|
by tomelders
2616 days ago
|
|
You're out of your mind if you think that's an better way to compose components. How would you do something like this? <DNDLlist render={(listItem => {
switch(listItem.type) {
case 'foo':
return <FooListItem>{listItem.title}</FooListItem>;
case 'bar':
return <BarListItem>{listItem.title}</BarListItem>;
default:
return <ListItem>{listItem.title}</ListItem>;
}
})}>
|
|