react-defer-image
v0.0.7
Published
React component for deferred <img> tag
Downloads
6
Maintainers
Readme
react-defer-image
Really simple image component that renders itself deferred.
Install
npm install --save react-defer-image
Usage
import React from "react";
import DeferImage from "react-defer-image";
return (
<DeferImage
src="image.png"
emptySrc="spinner.gif"/>
);
Props
src="String" [required]
Url to image.
emptySrc="String" [optional]
Url to image used to render when loading.
Attributions
Thanks to loktar00 / react-lazy-load for inspiration.