https://github.com/trendyol/react-intersection-images
React lazy load images with IntersectionObserver.
https://github.com/trendyol/react-intersection-images
Last synced: 7 months ago
JSON representation
React lazy load images with IntersectionObserver.
- Host: GitHub
- URL: https://github.com/trendyol/react-intersection-images
- Owner: Trendyol
- Created: 2020-07-02T13:44:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-03T11:17:44.000Z (12 months ago)
- Last Synced: 2025-06-21T13:51:13.382Z (7 months ago)
- Language: TypeScript
- Homepage:
- Size: 936 KB
- Stars: 14
- Watchers: 15
- Forks: 2
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Lazy Images
React lazy load images with IntersectionObserver.
## Usage
```js
import React from 'react';
import Lazy from "react-intersection-images"
const App = () => {
const placeholder = "https://picsum.photos/id/237/500/300"
const generateImg = () => `https://picsum.photos/id/${Math.floor(Math.random() * 999)}/500/300`
return (
);
}
export default App;
```