Pass image src and fallback src or data uri. Useful when you need to display image preloader in cases where src image might fail to resolve.
npm install react-image-preloader -S
React is a devDependency, so make sure you have react
available in your project
Props:
src
: String (url or data-uri)fallback
: String (url or data-uri)anonymous
: Boolean
var React = require('react');
var ImagePreloaderComponent = require('react-image-preloader');
React.render(<ImagePreloaderComponent src='http://volatiledomain.com/src.png' fallback='http://example.com/fallback.png' />, document.body);