Let's say I have an array that looks like this:
const array = [0, 1, 2, 3, 4, 5, 6, 7]
What I'm trying to do is iterate for every 2 objects in a .map function, but it needs to look like something like this in my render (note that I'm using React Bootstrap):
<Row>
<Col>array[0]</Col>
<Col>array[1]</Col>
</Row>
<Row>
<Col>array[2]</Col>
<Col>array[3]</Col>
</Row>
etc...
So for every 2 objects, it needs to have it's own row, and then render those 2 objects before closing a Row and starting a new Row if it has more elements.
What's the best way to achieve this?