Comments (1)
Yes, you have to manually call checkElementsInViewport()
when opening a tab. Alternatively the setInterval trick works, but it will cause continuous extra CPU consumption.
This complexity is the downfall of giving control of the performance impact of lazy loading: I didn't want to make a solution where there is a hidden performance impact.
I'm planning on making a v1 release that uses IntersectionObserver, which in turn won't require having checkElementsInViewport as it handles this issue better.
from react-lazy.
Related Issues (20)
- Broken? HOT 2
- v0.3.0 fails if ltIE9 attribute is missing HOT 1
- Google bot compatibility HOT 2
- Unable to get images to load HOT 10
- Noscript HOT 1
- Unable to load images inside a scrolling div HOT 3
- ltIE9 prop HOT 1
- Support for controlling debounce time HOT 4
- Relies on react-dom/server HOT 1
- Warning react 16.0 HOT 1
- [Question] Would it be possible to specify the cushion in a percent? HOT 2
- Too many images are loading HOT 2
- Feature request: Compatibility with libraries that rely on using react context api HOT 2
- Loading Placeholder for each item
- Image not showing on Chrome v75 HOT 3
- Any Update/Problem in React ^15.4.1 HOT 1
- React 15.5: Deprecation warnings for React.createClass and React.PropTypes HOT 1
- Fails when running webpack on Nextjs HOT 7
- Doesn't fall back if image fails to load HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-lazy.