Skip to content

Releases: garthenweb/react-viewport-utils

v1.6.1

04 Nov 15:59
Compare
Choose a tag to compare
  • [8aaaa75] fix worng initial value for useDimensions hook
  • [e50e69c] fix wrong dimension change detection where only changes to height and width where triggered
  • [f7d0b85] trigger update to documentHeight and documentWidth in situations where the onresize handler is not fired
  • [da5c006] restructure the documentation for a better overview

v1.6.0

28 Oct 22:51
Compare
Choose a tag to compare

v1.5.0

21 Oct 22:16
Compare
Choose a tag to compare
  • [d86e1ae] when no components are listening to updates the collector will be unmounted to save memory and cpu
  • [4b5321a, 240d687, e341f6e] add deferUpdateUntilIdle property for ObserveViewport and connectViewport to schedule updates only when the collection idles
  • [34f0b36] refactore legacy private scroll implementation

v1.4.0

07 Oct 21:06
Compare
Choose a tag to compare
  • [2cbecba, 4611fa8] don't register event handlers multiple times in case more than one ViewportProvider is already rendered within the same tree. This is mostly interesting for libraries that are rendering their own Provider component which implements the ViewportProvider #3
  • [b2d3fef] add a helpful warning in development in case a ObserveViewport component is rendered without a ViewportProvider as its parent

v1.3.0

24 Sep 21:47
Compare
Choose a tag to compare
  • [da1b492] use passive event listeners (if supported) to improve (scroll) performance

v1.2.1

23 Sep 23:00
Compare
Choose a tag to compare
  • [290f56e] remove throtteling to always provide an accurate scroll position

v1.2.0

23 Sep 15:02
Compare
Choose a tag to compare
  • [8f57de1, 9be8758] add clientWidth, clientHeight, outerWidth, outerHeight, documentWidth and documentHeight properties to dimensions
  • [50791dc] fix ConnectViewport to handle prop changes as expected
  • [a9bd1af] fix bug where not always the latest scroll position was provided
  • [06d2bfd] fix a bug (mostly in IE11) where the scroll direction switches back and forth without good reason

v1.1.0

22 Sep 16:19
Compare
Choose a tag to compare
  • [318da48] add recalculateLayoutBeforeUpdate property for ObserveViewport to allow badge layout reads before updates to components
  • [674d03f] reduce garbage in idle mode

v1.0.0

16 Sep 22:39
Compare
Choose a tag to compare

Breaking Changes

  • [9c85bd8] remove deprecated setInitials property from ObserveBoundingClientRect. To upgrade, use onInit instead.
  • [0344602] remove deprecated connectViewportScroll export. To upgrade use connectViewport instead.
  • [4deec23] update components wrapped with connectViewport and rendered as children from ObserveViewport within the second requestAnimationFrame instead of directly. This should in the most situations not be a problem. In case its required onUpdate from ObserveViewport still fired within the first frame.

Features

  • [4deec23] improve performance when now user interactions happen. This reduces the CPU usage on low end devices a lot.
  • [ab20f77] improve module declarations for better module usage.

v0.3.3

10 Sep 20:10
Compare
Choose a tag to compare
  • [ef0e8b4] change display name of ConnectViewport from connect to connectViewport to be more explicit
  • [e862a85] improve types for ConnectViewport
  • [59231f9] fix memoize-one import