joshwnj / joshwnj/react-visibility-sensor

getBoundingClientRect is expensive

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

Description

The `getBoundingClientRect` API takes several ms as it forces the web engine to recalculate the layout (see https://gist.github.com/paulirish/5d52fb081b3570c81e3a). This is an issue for the visibility-sensor component if we apply that to thousands of elements.

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.