joshwnj / joshwnj/react-visibility-sensor

Intersection Observer API

Open
#96 2 comments 10 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
2.3k
Forks
192
PR merge metrics
No merged PRs in 30d

Description

Hey,

have you seen and thought of using the Intersection Observer API? it removes the need to do the very expensive call to el.getboundingClientRect(); (Which causes a re-Layout).

It's supported in all the big browsers and Docs are here: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API#Browser_compatibility

I think it would be a great update.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.