Releases: garthenweb/react-viewport-utils
Releases · garthenweb/react-viewport-utils
v1.12.1
v1.12.0
- [8325ce6, d98c87f] allow passing dependencies to
useRect
anduseRectEffect
hooks #18 - [09a0bfb] allow passing priority to
connectViewport
HOC - [5cdd528, bca419b, 725caea] export typescript interfaces without I-prefix
- [4149dcc] bind utils to their parent objects to avoid type errors #17
- [02efe83] fix bug in updates of
recalculateLayoutBeforeUpdat
when used in combination withdeferUpdateUntilIdle
on auseViewportEffect
hook #16 - [7894033] fixes an issue where
ObserveViewport
had the default values after mounting - [51445ee] removes some dead code in
ObserveViewport
- [326087f] execute tests for NodeJS v13
- [6f6d655, 54a56ec, 3731b1b] dev dependencies update
v1.11.0
- [478f450] reduce work in idle mode
- [035e4e2] trigger updates after prop change via scheduler to reduce layout trashing
- [ef5f641] increase precision of layout measurement by adding a new
experimentalSchedulerEnabled
flag #14 - [fd7001d] allow bundler to optimize filesize
- [94c17fb] reduce expensive calls to cancel animation frame/ timeout
- [68655ee] export polyfilled requestAnimationFrame
- [dd3cd1c, 4bbcf9c] update dev dependencies
v1.10.1
- [c9cba89] only trigger one initial scroll event. This also corrects how
isScrollingRight
andisScrollingDown
are calculated, they are now onlytrue
in case an event that changed the regading direction was triggered (before e.g.isScrollingRight
was alwaystrue
in caseisScrollingLeft
wasfalse
which does not need to be correct) - [5ef35d0] always provide full viewport object for
ObserveViewport
, even if an update is disabled. This is especially important as version 1.9.3 where an initialize even can be fired even if all updates are disabled.
v1.10.0
- [3f7bfa2] allow updates to hook options at runtime, so that changes are accepted for the next scheduled update. #12
- [8346010] allow to pass dependency to effect hooks to force updates if external dependencies change. This also includes automatic updates for the
useRect
anduseReactEffect
functions as they now by default listen to the passed ref. #12 - [c81358a] warn in case two different versions of the react-viewport-utils are used in the same tree in development mode
v1.9.4
v1.9.3
- [0b322d4]
useLayoutSnapshot
was executing it's function in a way that causes layout trashing. The initial value is not generated using a common listener update in a requestAnimationFrame which should perform better. This event will be handled on all listeners so it makes sure that everything is up to date as soon as possible. - [dea07cb] update dependencies, which will update
memoize-one
to version 5.1.1 (from 5.0.0)
v1.9.2
- [46d3632] Fixed a performance issue when the provider was rerendered, e.g. because
children
orhasListeners
state changed. The fallback function was used for components updates in these situations which is costly. #8 - [46d3632, 1deba6f] In case the fallback function must be triggered, we now cache it's response per instance for 1 second to not cause to much harm #10
- [0e036bb] fix hooks argument change error #6
- [5a87c8f] improve typescript support for snapshot functions by using
unknown
type instead ofany
- [ca4cfb1] fix warning and it's example in case a hook was used without a provider
- [0235692] update dev dependencies to fix security warning
- [7055a03] remove NEW tag from scheduler
v1.9.1
- [94af676] fixes a regression in the last version were components went out of sync in case updates are skipped. This fix ensures, that all components are updated on idle in case they are out of sync, even if they are not registered for idle updates. This issue only exists in case the experimental scheduler was activated.
v1.9.0
- [f4345f2] add
useRect
hook to observe an elements size and position - [18f2eae] add
useViewportEffect
,useScrollEffect
,useDimensionsEffect
anduseRectEffect
handler to perform side effects without updating the component - [d06e889] fix a bug where non idle listeners were informed for idle events, which resulted in unnessesary events
- [7d749e8] deprecate
ObserveBoundingClientRect
as it has bad performance and can in most situations be replaced with theuseRect
hook.