Created
March 22, 2018 18:46
-
-
Save Aljullu/608d4eba5491a2a716daad924e3f2f2f to your computer and use it in GitHub Desktop.
MyImage.jsx (react-lazy-load-component example)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { LazyLoadImage } from 'react-lazy-load-image-component'; | |
const MyImage = ({ image }) => ( | |
<div> | |
<LazyLoadImage | |
alt={image.alt} | |
height={image.height} | |
src={image.src} | |
width={image.width} /> | |
<span>{image.caption}</span> | |
</div> | |
); | |
export default MyImage; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment