I have an array of items I would like to create Panels out of which would eventually be inserted into the Accordion.
In one file, I have:
var items = this.state.contents.map(function(content, index) {
return <Content {...content}, key={index}/>
};
return (
<Accordion>
{items}
</Accordion>
);
In another file called Content I have:
return(
<Panel header={this.props.header} eventKey={this.props.key}>
{this.props.body}
</Panel>
);
When I have the Accordion and Panel in the same file, they work. But when I generate the Panel using map after splitting them into two files, it doesn't seem to collapse.