Reactstrap Uncontrolled Collapse doesn't take template string!
{
state.data.map(datum => {
return (
<>
<Card id={`toggler${datum._id}`} className="mb-1 shadow-sm" >
<CardBody>
<div dangerouslySetInnerHTML={{ __html: datum.faqHeading }} />
</CardBody>
</Card>
<UncontrolledCollapse toggler=`toggler${datum._id}`>
<Card>
<CardBody >
<div dangerouslySetInnerHTML={{ __html: datum.faqBody }} />
</CardBody>
</Card>
</UncontrolledCollapse>
</>
)
})
}
Or is there any other way to achieve it? The data is coming from an API. Depending on that data (number of cards), Cards will be rendered!