项目作者: bdeloeste

项目描述 :
Get Lazy Lazy Loading Images Lazily
高级语言: TypeScript
项目地址: git://github.com/bdeloeste/lazy-loading-images-lazily.git
创建时间: 2019-03-07T15:43:41Z
项目社区:https://github.com/bdeloeste/lazy-loading-images-lazily

开源协议:MIT License

下载


Get Lazy Lazy Loading Images Lazily

This project was bootstrapped with Create React App and showcases a demo to easily utilize the IntersectionObserver API to lazy load images without doing work on the main thread.

To get started, simply run yarn start and check out the demo in your browser (http://localhost:3000)!

Project includes

  • Using the IntersectionObserver in React.
  • Using the src attribute to reference the placeholder image when the page first loads and using the data-src attributes which reference the URL of the image to load when the element is in the viewport.
  • Polyfill for IntersectionObserver
  • A sick demo with sweet HD pics of IPAs.