React - Class component return

0 votes
213 views
added Mar 5, 2019 in React by LC Marshal Captain (25,790 points)
import React from 'react'; 
import ImageGallery from 'react-image-gallery';

class GalleryComponent extends React.Component {
  
  render() {
    const originalImg = 'yourimage.com/source/1.jpg';
    const thumbImg = 'yourimage.com/source/thumb/1.jpg';
    const images = [
      {
        original: originalImg,
        thumbnail: thumbImg,
      },
      {
        original: 'http://lorempixel.com/1000/600/nature/2/',
        thumbnail: 'http://lorempixel.com/250/150/nature/2/'
      },
      {
        original: 'http://lorempixel.com/1000/600/nature/3/',
        thumbnail: 'http://lorempixel.com/250/150/nature/3/'
      }
    ]

    return (
      // <ImageGallery items={images} />
      <div className="gallery">
      </div>
    );
  }

}
export default GalleryComponent;

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...