Background-Image-On-Load
A simple way to check background-image
is loaded.
### Installation
npm:
npm install background-image-on-load --save
yarn:
yarn add background-image-on-load
### Usage
; ; state = bgIsLoaded: false ; { const bgIsLoaded = thisstate; return <div style= height: 300 backgroundPosition: 'center' backgroundSize: 'cover' backgroundImage: `url()` > <BackgroundImageOnLoad src='https://unsplash.it/1200/310?random' onLoadBg= this onError= console /> </div> ; } ;