How to insert div elements in each picture?

Good afternoon. Please help.

As for the queue at each iteration to convey the image in a div. (img1, img2, img3, etc.)?

import React { Component } from 'react';
import { connect } from 'react-redux';
img1 import from './img/1001.jpg'
img2 import from './img/1002.jpg'
img3 import from './img/1003.jpg'
img4 import from './img/1004.jpg'
import img5 from './img/1005.jpg'
img6 import from './img/1006.jpg'

ShowBlock class extends Component {

 render() {
 var keys = new Date().getTime();
 return (
 <div classname="ShowBlock">
 <div classname="row">
 {this.props.data.serverData.map((item, index)=>
 <div classname="col-md-4" key="{index+(2*keys)}">
 <div classname="block">
 <img src="{img1," img2, img3, etc.}>
the <div>{item.description}</div>
 <div classname="col-md-6" id="price">{item.price}</div>
 <div classname="col-md-6"> <button type="button" class="btn-lg btn btn-success">Buy</button></div>

</div>

</div>

)}

</div>
</div>
);
}
}
June 14th 19 at 18:09
1 answer
June 14th 19 at 18:11
Solution
So?
var imgs = [img1, img2, img3,img4,img5,img6]
<img src="{imgs[index]+index}">
And import images you can cram into the array? - brendan.Bahringer commented on June 14th 19 at 18:14
there's only one way to find out) - orrin_Hilpert commented on June 14th 19 at 18:17
That's for sure) sorry now not at a computer. As will immediately try) thanks - brendan.Bahringer commented on June 14th 19 at 18:20

Find more questions by tags JavaScriptReact