react-lazyload-wrapper-robert

0.0.1 • Public • Published

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'));

Readme

Keywords

none

Package Sidebar

Install

npm i react-lazyload-wrapper-robert

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • robertxu7