0.0.6-BETA02 • Published 5 years ago
react-image-lazy-prefetch v0.0.6-BETA02
react-image-lazy-prefetch
A simple react-library to lazy-load or prefetch images
Usage
Add to your package like this:
npm install --save react-image-lazy-prefetch
Or using Yarn:
yarn add react-image-lazy-prefetch
Then in your component
import Image from 'react-image-lazy-prefetch';
const MyComp = () => {
const imgSrc=`https://picsum.photos/200/300`
return <Image src={imgSrc} />
}
Optional parameters
You can add the below optional params:
style
- the styles that you want on the resultant image (img
) tagwidth
- the width of the resultant imageheight
- the height of the resultant image
Peer dependency
Only, one: react
(latest if possible).
License
MIT.
About me
Here I am: https://knc.js.org
Twitter: @itsKNC
0.0.6-BETA02
5 years ago
0.0.6-BETA01
5 years ago
0.0.5-beta01
5 years ago
0.0.5
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago