我将 React 与 React Boostrap 一起使用,我试图弄清楚如何将三张卡片放在三列上,并在每次达到三张卡片时添加一个新行。我似乎无法理解如何打印出新的 Row 标签。据我了解,我无法以一种好的方式将条件包裹在 and 标签周围。我怎么能接近这个?
{items &&
items.map((item, index) =>
<Row>
<Col>
<Card style={{ width: '18rem' }}>
<Card.Img variant="top" src={item.logo}/>
<Card.Body>
<Card.Title>Card Title</Card.Title>
<Card.Text>
Some quick example text to build on the card title and make up the bulk of
the card's content.
</Card.Text>
<Button variant="primary">Go somewhere</Button>
</Card.Body>
</Card>
</Col>
</Row>
)
}