1// images.js
2const images = [
3 { id: 1, src: './assets/image01.jpg', title: 'foo', description: 'bar' },
4 { id: 2, src: './assets/image02.jpg', title: 'foo', description: 'bar' },
5 { id: 3, src: './assets/image03.jpg', title: 'foo', description: 'bar' },
6 { id: 4, src: './assets/image04.jpg', title: 'foo', description: 'bar' },
7 { id: 5, src: './assets/image05.jpg', title: 'foo', description: 'bar' },
8 ...etc
9];
10
11export default images;
12
1// MyComponent.js
2import images from './images'
3
4//...snip
5
6{ images.map(({id, src, title, description}) => <img key={id} src={src} title={title} alt={description} />)
7