An open API service indexing awesome lists of open source software.

https://github.com/littlee/react-img-preloader

A Image preloader for React, aims for making image preloading dead-simple and easing the task of showing a running progress bar
https://github.com/littlee/react-img-preloader

image-loading image-preloader progressbar react react-component

Last synced: 5 months ago
JSON representation

A Image preloader for React, aims for making image preloading dead-simple and easing the task of showing a running progress bar

Awesome Lists containing this project

README

          

React-Img-Preloader

A Image preloader for React, aims for making image preloading dead-simple and easing the task of showing a running progress bar

Install 💡

```bash
npm install react-img-preloader --save
```

How To Use 🥊

```js
import ImgPreloader from 'react-img-preloader'

// gather up all images you want for preload in an array
var images = [
require('/your/path/to/img1'),
require('/your/path/to/img2'),
require('/your/path/to/img3'),
// ... more goes here
]

{
console.log('All images are loaded')
}}>
{
({loaded, total}) =>

imgages planned for preload: {total}; images have been preloaded: {loaded}

}

```