|
1 | 1 | # [7.0.0](https://github.com/ZeeCoder/use-resize-observer/compare/v6.1.0...v7.0.0) (2020-11-11)
|
2 | 2 |
|
3 |
| - |
4 | 3 | ### Bug Fixes
|
5 | 4 |
|
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. |
9 | 12 |
|
10 |
| -* Added Semantic Release ([55f6368](https://github.com/ZeeCoder/use-resize-observer/commit/55f6368c1b0c3154bfd6ed16e089763de0b0ba47)) |
| 13 | +### Features |
11 | 14 |
|
| 15 | +- The `ref` option now accepts raw elements as well. |
12 | 16 |
|
13 | 17 | ### BREAKING CHANGES
|
14 | 18 |
|
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 |
16 | 20 | - The returned ref will always be the same RefCallback.
|
17 | 21 | Previously when a custom ref object was passed, it was returned as well from
|
18 | 22 | 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).) |
21 | 39 |
|
22 | 40 | # [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)
|
23 | 41 |
|
|
0 commit comments