I have a map function which should dynamic show classNames. In this function i want to set the className dynamic. I tried to set the className also without the
$
But dosen't also not work
this.state.antwort.map((item,key) => <Col md={2} key={key} className={' ${item.gender == "Female" ? karteFemale : karteMann}' } > ... ) } But i got the error, that the classNames are undefined. So how can i set the classes flexible ?