You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+47-5Lines changed: 47 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,59 @@
1
+
## 10.0.0
2
+
3
+
-_Major breaking change_: replaced `index.modern.js` with `index.mjs`. Might require a little change in your build pipeline
4
+
-_Major breaking change_: New option `debounceOnServer`: if you put the option to true, it will run debouncing on server (via `setTimeout`). The new option can break your current server behaviour, as v9.x, it runs all the time and might cause unnessesary server CPU utilisation. Now, by default, debounced callbacks do not happen on server.
5
+
-_Minor breaking change_: Replaced `useState` for `useDebounce` with `useReducer`. It might lead to reduced amount of re-renders, as useState is known to have excess re-renders in some corner: https://stackoverflow.com/questions/57652176/react-hooks-usestate-setvalue-still-rerender-one-more-time-when-value-is-equal
6
+
-_Minor breaking change_: `useDebouncedCallback` now updates function to call asap. Meaning, if you re-called the hook and it should trigger immediately, it will trigger the newest function all the time.
7
+
- Lib size:
8
+
914 B: index.js.gz
9
+
851 B: index.js.br
10
+
883 B: index.mjs.gz
11
+
826 B: index.mjs.br
12
+
938 B: index.module.js.gz
13
+
873 B: index.module.js.br
14
+
989 B: index.umd.js.gz
15
+
919 B: index.umd.js.br
16
+
-[Internal] Replaced Enzyme with @testing-library
17
+
-[Internal] yarn classic => npm
18
+
-[Internal] Updated devDependencies
19
+
1
20
## 9.0.4
21
+
2
22
- Tweak exports, see [PR](https://github.com/xnimorz/use-debounce/pull/160), thanks to [@Andarist](https://github.com/Andarist)
3
23
- Changed types, see [PR](https://github.com/xnimorz/use-debounce/pull/158), thanks to [@wangcch](https://github.com/wangcch)
4
24
5
25
## 9.0.3
26
+
6
27
- Represent correct return type from useDebounce(), see [issue](https://github.com/xnimorz/use-debounce/pull/155), thanks to [@appden](https://github.com/appden)
7
28
8
29
## 9.0.2
30
+
9
31
- Reverted 9.0.0. We will revisit these changes later
10
32
11
33
## 9.0.0
34
+
12
35
- Moved use-debounce to support modules see [issue](https://github.com/xnimorz/use-debounce/issues/147) Thanks to [@matewilk](https://github.com/matewilk)
13
36
-_breaking change_ The path to `dist/index.js` is changed. Now it's `dist/index.cjs`.
14
37
15
38
## 8.0.4
39
+
16
40
- Changes types for `useDebouncedCallback` args: https://github.com/xnimorz/use-debounce/pull/140 Thanks to [@sarunast](https://github.com/sarunast)
17
41
18
42
## 8.0.3
43
+
19
44
- Added `types` to package json to mitigate https://github.com/microsoft/TypeScript/issues/49160. https://github.com/xnimorz/use-debounce/pull/138 Thanks to [@wuzzeb](https://github.com/wuzzeb)
20
45
21
46
## 8.0.2
47
+
22
48
- Added type exports. https://github.com/xnimorz/use-debounce/pull/136 Thanks to [@tryggvigy](https://github.com/tryggvigy)
23
49
- Improved code comments. https://github.com/xnimorz/use-debounce/pull/135 Thanks to [@tryggvigy](https://github.com/tryggvigy)
24
50
25
51
## 8.0.1
52
+
26
53
- update library exports section to make exports work correctly with jest@28
27
54
28
55
## 8.0.0
56
+
29
57
-_breaking change_`useDebounce` changed its build system to microbundle. For now we have several entries:
30
58
31
59
`index.js` is for commonJS approach
@@ -36,10 +64,13 @@ All the files are in `dist` folder.
36
64
If you have any paths which have `esm` or `lib`, please, replace them to `dist`:
@@ -49,10 +80,12 @@ import { useDebounceCallback } from 'use-debounce';
49
80
- Fixed issue with `leading: true`https://github.com/xnimorz/use-debounce/issues/124 Thanks to [@mntnoe](https://github.com/mntnoe) for reporting
50
81
51
82
## 7.0.1
83
+
52
84
-`debounced` object now is preserved for `use-debounce` between the renders. Thanks to [@msharifi99](https://github.com/msharifi99) for reporting.
53
85
54
86
## 7.0.0
55
-
-_breaking change_`useDebounce` hook changed `isPending` behavior from `async` reacting to the sync. Now `isPending` returns `True` as soon as the new value is sent to the hook.
87
+
88
+
-_breaking change_`useDebounce` hook changed `isPending` behavior from `async` reacting to the sync. Now `isPending` returns `True` as soon as the new value is sent to the hook.
56
89
- Dev dependencies updated
57
90
58
91
## 6.0.1
@@ -193,7 +226,8 @@ import { useDebounceCallback } from 'use-debounce';
0 commit comments