lazy-pictures
v0.1.0-beta.2
Published
React image loading component
Downloads
4
Maintainers
Readme
lazy-pictures
基于IntersectionObserver
构造函数编写的React图片懒加载组件
使用
npm i lazy-pictures
示例
import Loader from 'lazy-pictures';
import aPng from './assets/1.jpg';
export default () => {
return (
<div style={{ display: 'flex', width: '100%', minWidth: "1200px" }}>
<h1 style={{ width: '3000px', height: '600px' }}>1</h1>
<Loader style={{ width: '200px' }} src={aPng} />
</div>
);
};