React OnVisible Component

Category: React , Scroll | September 19, 2016
Author: dazld
Views Total: 169
Official Page: Go to website
Last Update: September 19, 2016
License: MIT

This is a higher order react component that applies the css class visible to the container when the element becomes more than 50% visible in the browser viewport.

Viewport visibility is calculated by listening to a debounced window scroll event (10ms), and once the element has been found to be visible, no further changes are applied.

Preview:

react-onvisible-component