Releases: garthenweb/react-viewport-utils
Releases · garthenweb/react-viewport-utils
v1.6.1
- [8aaaa75] fix worng initial value for
useDimensionshook - [e50e69c] fix wrong dimension change detection where only changes to height and width where triggered
- [f7d0b85] trigger update to
documentHeightanddocumentWidthin situations where theonresizehandler is not fired - [da5c006] restructure the documentation for a better overview
v1.6.0
v1.5.0
- [d86e1ae] when no components are listening to updates the collector will be unmounted to save memory and cpu
- [4b5321a, 240d687, e341f6e] add
deferUpdateUntilIdleproperty forObserveViewportandconnectViewportto schedule updates only when the collection idles - [34f0b36] refactore legacy private scroll implementation
v1.4.0
- [2cbecba, 4611fa8] don't register event handlers multiple times in case more than one
ViewportProvideris already rendered within the same tree. This is mostly interesting for libraries that are rendering their ownProvidercomponent which implements theViewportProvider#3 - [b2d3fef] add a helpful warning in development in case a
ObserveViewportcomponent is rendered without aViewportProvideras its parent
v1.3.0
v1.2.1
v1.2.0
- [8f57de1, 9be8758] add
clientWidth,clientHeight,outerWidth,outerHeight,documentWidthanddocumentHeightproperties to dimensions - [50791dc] fix
ConnectViewportto 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
v1.0.0
Breaking Changes
- [9c85bd8] remove deprecated
setInitialsproperty fromObserveBoundingClientRect. To upgrade, useonInitinstead. - [0344602] remove deprecated
connectViewportScrollexport. To upgrade useconnectViewportinstead. - [4deec23] update components wrapped with
connectViewportand rendered as children fromObserveViewportwithin the secondrequestAnimationFrameinstead of directly. This should in the most situations not be a problem. In case its requiredonUpdatefromObserveViewportstill fired within the first frame.
Features