Releases: wellyshen/react-cool-dimensions
Releases · wellyshen/react-cool-dimensions
v3.0.1
Fix the type of the width
and height
states #775
v3.0.0
💥 BREAKING CHANGE
- Initial
width
and height
now are null
, see doc. Thanks to @sirkrisp
v2.0.6
- Refactor(types): enhance the types of event properties (#477)
v2.0.5
- Refactor(types): export more types to fulfill your use cases ( #474 )
v2.0.4
- Refactor(types): simplify generic variable
- const { observe } = useDimensions<HTMLDivElement | null>();
+ const { observe } = useDimensions<HTMLDivElement>();
v2.0.3
- Fix: avoid extra re-rendering
v2.0.1
Fix: un-observe the previous target element when updating the new target element via the observe
API
v2.0.0
✌🏻 React Cool Dimensions V2 comes out!
- Remove
ref
API, use observe
instead, see this example
- Remove
ref
option, if you want to share a ref
see this example
- Smaller bundle size, around 1kB gzipped
- Fix the type of exported hook function