Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

React - Class component return

0 votes
13 views
added Mar 5 in React by LC Marshal Lieutenant (16,990 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;

 

Please log in or register to response this reference.

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