Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use IntersectionObserver #16

Closed
Aljullu opened this issue Dec 1, 2018 · 0 comments
Closed

Use IntersectionObserver #16

Aljullu opened this issue Dec 1, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Aljullu
Copy link
Owner

Aljullu commented Dec 1, 2018

IntersectionObserver is a performant way to detect if an element is inside the viewport or not.

react-lazy-load-image-component should use that instead of some complex computations with the element position and the scroll position of the window to detect if the element is visible or not.

This must be implemented in a form that it fallbacks to the element position computations for browsers that don't support IntersectionObserver.

@Aljullu Aljullu added the enhancement New feature or request label Dec 1, 2018
@Aljullu Aljullu self-assigned this Dec 1, 2018
This was referenced Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant