Is there any problem of using array to save src in it to display on component, it doesn't work?
const imgs = [
'./../imgs/book1.jpg',
'./../imgs/book2.jpg',
'./../imgs/book3.jpg',
]
const displayImg = imgBooks.forEach(img => {
return (
<figure>
<img src={img} alt='book' />
</figure>**strong text**
)
})
foreach()on the imgs array instead of the imgBooks array since the imgs array has the images in it. Otherwise it would be helpful to see the code where the variable imgBooks is created.forEachwill not return an array so you want to usemap. stackoverflow.com/a/34426481/1370487