npm react-waypoint 3.0.0
v3.0.0

latest releases: 10.3.0, 10.1.0, 10.0.0...
8 years ago

Changes:

  • Scroll events can now be throttled to improve performance. See the README on Throttling for more information.
  • threshold has been split into two new props: bottomOffset and topOffset. This means that you can trigger callbacks differently on the top and bottom edges (previous prop threshold was used for both). The new props allow pixel values (e.g. '20px', 20), and percentages (e.g. '5%').

To migrate old waypoints using threshold, you should translate the value into a percentage, and use bottomOffset and topOffset.

// Old code using `threshold`
<Waypoint threshold={0.1} />
// New code using `bottomOffset` and `topOffset`
<Waypoint bottomOffset='-10%' topOffset='-10%' />

// Alternatively, you can leave out one of the two offsets
<Waypoint topOffset='-10%' />

Don't miss a new react-waypoint release

NewReleases is sending notifications on new releases.