Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Releases: thebuilder/react-scroll-percentage

v4.2.0

19 Nov 11:56
Compare
Choose a tag to compare

v4.1.0...v4.2.0

v4.1.0

16 Jul 08:41
Compare
Choose a tag to compare
  • chore: add contents to release script bbff0ab
  • Merge remote-tracking branch 'origin/master' f153ce2
  • chore: upgrade dependencies a27156c
  • fixes small typo in README (#115) 92c0c4d
  • build: remove np from devDependencies 2fb4c28

v4.0.7...v4.1.0

v4.0.7

06 Jun 19:55
Compare
Choose a tag to compare

This is just some releases trying to streamline the publish process. No actual changes. :)
4.0.6...v4.0.7

v4.0.4

06 Jun 14:02
Compare
Choose a tag to compare
  • refactor: Remove the useCallback from the hook (#111) 6a45e93
  • chore(package): update styled-components to version 4.2.1 (#107) 7e7a000
  • commit the current version number c6e0d30
  • correct the file paths 54d8c6e

v4.0.1...v4.0.4

TypeScript and Hooks!

30 May 15:28
Compare
Choose a tag to compare

This is a complete rewrite of the library. 🎉

New features

  • Rewritten in TypeScript
  • Added useScrollPercentage hook
  • Added render props component

If you were using an old version, make sure to consult the updated readme to see how the API has changed.

Update React Intersection Observer

29 Jun 12:07
Compare
Choose a tag to compare

This updates the version of react-intersection-observer and improves tests.

The API haven't changed, so you shouldn't need to update anything.

v1.0.0

08 Nov 08:55
Compare
Choose a tag to compare

Flow support

Breaking changes

The children() and onChange method has been changed, so they receive two arguments instead of an object.

Child as function

import ScrollPercentage from 'react-scroll-percentage'

<ScrollPercentage>
  {(percentage, inView ) => (
    <h2>{`Percentage scrolled: ${percentage.toPrecision(2)}%.`}</h2>
  )}
</ScrollPercentage>

OnChange callback

import ScrollPercentage from 'react-scroll-percentage'

<ScrollPercentage onChange={(percentage, inView) => console.log(percentage, inView)}>
  <h2>
    Plain children are always rendered. Use onChange to monitor state.
  </h2>
</ScrollPercentage>