|
1 | 1 | # CHANGELOG |
2 | | - |
3 | | -## 7.0.0-alpha.2 |
4 | | - |
5 | | -- Added tests in real browsers with Browserstack, so that we ensure the lib |
6 | | - works all the way back to IE11. |
7 | | -- Switched to GitHub Actions |
8 | | - |
9 | | -## 7.0.0-alpha.1 |
10 | | - |
11 | | -- **[BREAKING]** The returned ref is now a RefCallback, not a ref object |
12 | | -- **[BREAKING]** The returned ref will always be the same RefCallback. |
13 | | - Previously when a custom ref object was passed, it was returned as well from |
14 | | - the hook as "ref". |
15 | | -- **[BREAKING]** Compared to 6.2.0-alpha.1 There's no `callbackRef` return value |
16 | | - anymore. |
17 | | - |
18 | | -## 6.2.0-alpha.1 |
19 | | - |
20 | | -- Only instantiating a ResizeObserver instance if there's actually something to |
21 | | - observe. This for example means that if you pass in `null` or undefined as the |
22 | | - ref, or if neither the default ref or RefCallback returned from the hook are |
23 | | - in use, then no ResizeObserver instance will get created until there's an |
24 | | - actual element to observe. Resolves: #42 |
25 | | -- The hook now returns `callbackRef`, which can be used in place of the usual |
26 | | - `ref`. Use this instead of a normal ref, when the observed component is |
27 | | - mounted with a delay. Resolves: #43, #45 |
28 | | -- The `ref` option now accepts raw elements as well. |
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 | | -- Fixed an error where in certain edge cases the hook tried to set state when |
35 | | - its host component already unmounted. |
36 | | -- Added [contributing guidelines](./CONTRIBUTING.md) |
37 | | -- Overall bundle size increased a bit, due to the new features added. |
38 | | - (With about ~150B or so.) |
39 | | - |
40 | | -## 6.1.0 |
41 | | - |
42 | | -- No changes, only publishing the next minor. |
43 | | - |
44 | | -## 6.1.0-alpha.3 |
45 | | - |
46 | | -- Fixed SSR rendering, and added a test to cover it. |
47 | | - |
48 | | -## 6.1.0-alpha.2 |
49 | | - |
50 | | -- ResizeObserver instances are no longer created unnecessarily when the onResize |
51 | | - callback changes. (Fixes #32) |
52 | | -- Written new tests in [react testing library](https://github.com/testing-library/react-testing-library). |
53 | | - |
54 | | -## 6.1.0-alpha.1 |
55 | | - |
56 | | -- Rewrote the source in TypeScript. (Feedback is welcome.) |
57 | | -- Rewrote tests in TypeScript as well. (Ensures the types make sense.) |
58 | | -- Added checks to ensure reasonable bundle size. |
59 | | - |
60 | | -## 6.0.0 |
61 | | - |
62 | | -- **[BREAKING]** Default width and height can now be set by declaring defaults |
63 | | - for object destructuring, instead of having custom options for them. |
64 | | - This means the following options were removed: `defaultWidth`, `defaultHeight`, |
65 | | - `useDefaults`. |
66 | | -- **[BREAKING]** Due to the above, the default width and height will be |
67 | | - `undefined` instead of `1`. |
68 | | -- Docs were updated to reflect the above changes. |
69 | | -- Added an `onResize` handler that can report size changes instead of the default |
70 | | - object return. (This also helps implementing a more performant throttle / |
71 | | - debounce solution.) |
72 | | - |
73 | | -## 5.0.0 |
74 | | - |
75 | | -- **[BREAKING]** `#14` Removed the polyfill from the default builds, and shipping |
76 | | - it instead as as separate module. |
77 | | -- **[BREAKING]** `#21` Returning an object instead of an array, so that values not |
78 | | - needed could be omitted. |
79 | | -- `#18` Added missing copyright notice in the MIT license. |
80 | | -- Improved ref handling: |
81 | | - - `#16` You can now pass in your own ref |
82 | | - - The same hook instance can now be reused with different refs |
83 | | - - The hook will no longer break if the ref is not immediately filled. |
84 | | - (Anything other than an object with a `.current` value of an `Element` will |
85 | | - be ignored.) |
86 | | -- Made defaults optional with the `useDefaults` option. |
87 | | -- New `package.json` scripts to ease development |
88 | | -- Added throttle and debounce guides to the readme |
89 | | -- More tests |
90 | | - |
91 | | -## 4.0.0 |
92 | | - |
93 | | -- Added option to pass default width and height. Useful when using the lib with |
94 | | - SSR. (Thanks [Simon Boudrias](https://github.com/SBoudrias) and |
95 | | - [Fokke Zandbergen](https://github.com/FokkeZB)) |
96 | | -- Dep upgrades |
97 | | -- **[BREAKING]** Removed TS types. See: |
98 | | - - https://github.com/ZeeCoder/use-resize-observer/issues/12 |
99 | | - - https://github.com/ZeeCoder/use-resize-observer/pull/13 |
100 | | - - https://github.com/ZeeCoder/use-resize-observer/pull/8 |
101 | | - |
102 | | -## 3.1.0 |
103 | | - |
104 | | -- Added Typescript types |
105 | | - |
106 | | -## 3.0.0 |
107 | | - |
108 | | -- **[BREAKING]** Requires React 16.8.0 or above, which is the first non-alpha |
109 | | - release that includes hooks |
110 | | - |
111 | | -## 2.0.1 |
112 | | - |
113 | | -- No real changes, testing travis deployment from master |
114 | | - |
115 | | -## 2.0.0 |
116 | | - |
117 | | -- **[BREAKING]** Returning a tuple and creating a ref object automatically |
118 | | -- Using resize-observer-polyfill instead of resize-observer |
119 | | -- Fixed an issue where resize observer would trigger changes endlessly |
120 | | -- Added tests using Karma |
121 | | - |
122 | | -## 1.0.0 |
123 | | - |
124 | | -- Initial release |
0 commit comments