Skip to content

vihangpatel/binary-lazy-loading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

binary-lazy-loading

Instead of brute forcing the entire list of images to be lazily loaded, use binary search algorithm to minimize looping of testing whether the element is in view port or not.

Configure

Call registerLazyImageScrollHandler() in componentDidMount of root class to register scroll listener.

How to use it ?

Import it using the below

import LazyImage from 'lazy-image'

<LazyImage src={this.props.src} />.

And that will lazy load the image with optimized version of lazy loading.

About

Instead of brute forcing the entire list of images to be lazily loaded, use binary search algorithm to minimize looping of testing whether the element is in view port or not.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors