Skip to content

chenzhihao/react-lazyload-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d8d4189 · Mar 18, 2017

History

8 Commits
Dec 29, 2016
Dec 29, 2016
Dec 29, 2016
Dec 29, 2016
Dec 29, 2016
Dec 29, 2016
Dec 29, 2016
Dec 29, 2016
Dec 29, 2016
Mar 18, 2017
Dec 29, 2016
Dec 29, 2016
Dec 29, 2016

Repository files navigation

react-lazyload-wrapper

React higher order component which is used to make any another component become lazyload.

NPM

Install

npm i --save react-lazyload-wrapper

Showcase

If github EAT my gif, check it here: https://zhihao.tech/react-lazyload-wrapper.gif

Usage

import LazyLoadHOC from 'react-lazyload-wrapper';
import Photo from './Photo';

let LazyLoadPhoto = LazyLoadHOC(Photo);
ReactDOM.render(
  <div>
    <div style={{height: '2000px'}}> scroll</div>
    <LazyLoadPhoto
      thumbnailUrl={'ImagePath'}
    />
  </div>
  , document.getElementById('app'));

About

React lazyloader wrapper, which is a High Order Component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published