React High Order Component (HOC) to handle Image Components pre-loading state and onLoad error state
npm install react-image-loader-hocReact-Image-Loader-HOC is a High Order Component that allows you to enhance your React Image Component by adding features to handle the loading of the image source in an elegant way.
$ yarn add react-image-loader-hoc
or
$ npm install --save react-image-loader-hoc
`Usage
`
import React, { Component } from 'react';
import withImageLoader from 'react-image-loader-hoc';const Image = props => (
);
const ImageWithLoader = withImageLoader(Image);
class App extends Component {
render() {
return (
src="https://edmullen.net/test/rc.jpg"
width="400px"
height="200px"
/>
);
}
}
``