Releases: garthenweb/react-viewport-utils
Releases · garthenweb/react-viewport-utils
v1.6.1
- [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
anddocumentWidth
in situations where theonresize
handler 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
deferUpdateUntilIdle
property forObserveViewport
andconnectViewport
to 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
ViewportProvider
is already rendered within the same tree. This is mostly interesting for libraries that are rendering their ownProvider
component which implements theViewportProvider
#3 - [b2d3fef] add a helpful warning in development in case a
ObserveViewport
component is rendered without aViewportProvider
as its parent
v1.3.0
v1.2.1
v1.2.0
- [8f57de1, 9be8758] add
clientWidth
,clientHeight
,outerWidth
,outerHeight
,documentWidth
anddocumentHeight
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
v1.0.0
Breaking Changes
- [9c85bd8] remove deprecated
setInitials
property fromObserveBoundingClientRect
. To upgrade, useonInit
instead. - [0344602] remove deprecated
connectViewportScroll
export. To upgrade useconnectViewport
instead. - [4deec23] update components wrapped with
connectViewport
and rendered as children fromObserveViewport
within the secondrequestAnimationFrame
instead of directly. This should in the most situations not be a problem. In case its requiredonUpdate
fromObserveViewport
still fired within the first frame.
Features