github thebuilder/react-intersection-observer v8.22.0
Rework some internals

latest releases: v10.0.0, v9.16.0, v9.15.1...
6 years ago

Potential breaking change #195

Change for the <InView>

Previously, the initial callback would trigger a state update, even if the element was still outside the viewport.
This update changes the behavior, so it won't trigger new state update before the element enters the viewport.

If you used the IntersectionObserverEntry during that first callback, it will no longer work. The use case for this, is most likely to determine if the element started outside the viewport.

Workaround

As a workaround, you can use the onChange callback, since this will still be called everytime.

Don't miss a new react-intersection-observer release

NewReleases is sending notifications on new releases.