Load your React Component based on viewport, this library using Intersection Observer if your app targeting to not modern browser please adding this Polyfill.
- Type safe
- Preload component
- SSR Support
$ yarn add react-lazy-viewport
$ npm i react-lazy-viewport
We assume we have some code like this.
and then if you open the dev tools, the file will be loaded based on viewport
- Fork and send Pull Requests are welcome
- Submit an issues
- A new feature requests
This library is MIT licensed