Skip to content

Commit d8da045

Browse files
committed
chore: changelog fixes
1 parent 809e36e commit d8da045

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

CHANGELOG.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,41 @@
11
# [7.0.0](https://github.com/ZeeCoder/use-resize-observer/compare/v6.1.0...v7.0.0) (2020-11-11)
22

3-
43
### Bug Fixes
54

6-
* semantic release fixes ([3769769](https://github.com/ZeeCoder/use-resize-observer/commit/3769769dd550e96b8497c1ccebcffc3b30d2eb7a))
7-
* Using package.json file attr instead of gitignore ([c58f34e](https://github.com/ZeeCoder/use-resize-observer/commit/c58f34e11b68ef9622a6b2528da8ee68a9685211))
8-
5+
- Only instantiating a ResizeObserver instance if there's actually something to
6+
observe. This for example means that if you pass in `null` or undefined as the
7+
ref, or if neither the default ref or RefCallback returned from the hook are
8+
in use, then no ResizeObserver instance will get created until there's an
9+
actual element to observe. Resolves: #42
10+
- Fixed an error where in certain edge cases the hook tried to set state when
11+
its host component already unmounted.
912

10-
* Added Semantic Release ([55f6368](https://github.com/ZeeCoder/use-resize-observer/commit/55f6368c1b0c3154bfd6ed16e089763de0b0ba47))
13+
### Features
1114

15+
- The `ref` option now accepts raw elements as well.
1216

1317
### BREAKING CHANGES
1418

15-
* - The returned ref is now a RefCallback, not a ref object
19+
- The returned ref is now a RefCallback, not a ref object. Resolves: #43, #45
1620
- The returned ref will always be the same RefCallback.
1721
Previously when a custom ref object was passed, it was returned as well from
1822
the hook as "ref".
19-
- Compared to 6.2.0-alpha.1 There's no `callbackRef` return value
20-
anymore.
23+
- Compared to 6.2.0-alpha.1 There's no `callbackRef` return value anymore.
24+
25+
### Misc
26+
27+
- Using package.json file attr instead of gitignore ([c58f34e](https://github.com/ZeeCoder/use-resize-observer/commit/c58f34e11b68ef9622a6b2528da8ee68a9685211))
28+
- Added Semantic Release ([55f6368](https://github.com/ZeeCoder/use-resize-observer/commit/55f6368c1b0c3154bfd6ed16e089763de0b0ba47))
29+
- Handling custom refs (through options), the default ref and the RefCallback
30+
has been greatly refactored internally (into the `useResolvedElement`
31+
hook), to handle more edge cases with the way refs are handled.
32+
- Tests based on react testing library were refactored to make them much simpler
33+
and more approachable.
34+
- Added [contributing guidelines](./CONTRIBUTING.md)
35+
- Added tests in real browsers with BrowserStack, so that we ensure the lib
36+
works all the way back to IE11.
37+
- Switched to GitHub Actions from Travis, as builds started to freeze. (They've
38+
also announced a [limit on OS projects](https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing).)
2139

2240
# [7.0.0-alpha.4](https://github.com/ZeeCoder/use-resize-observer/compare/v7.0.0-alpha.3...v7.0.0-alpha.4) (2020-11-11)
2341

0 commit comments

Comments
 (0)