use-debounce
Advanced tools
Comparing version
@@ -23,3 +23,3 @@ import { useCallback, useRef, useState } from 'react'; | ||
} | ||
return [state, { cancel: debounced.cancel, isPending: debounced.isPending, flush: debounced.flush }]; | ||
return [state, debounced]; | ||
} |
@@ -25,4 +25,4 @@ "use strict"; | ||
} | ||
return [state, { cancel: debounced.cancel, isPending: debounced.isPending, flush: debounced.flush }]; | ||
return [state, debounced]; | ||
} | ||
exports.default = useDebounce; |
{ | ||
"name": "use-debounce", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"description": "Debounce hook for react", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -304,3 +304,3 @@ <div align="center"> | ||
| trailing | true | This param executes the function after timeout. | https://github.com/xnimorz/use-debounce#leading-calls | | ||
| equalityFn | (prev, next) => prev === next | Comparator function which shows if timeout should be started | | | ||
| equalityFn | (prev, next) => prev === next | [useDebounce ONLY] Comparator function which shows if timeout should be started | | | ||
@@ -307,0 +307,0 @@ ## useThrottledCallback |
55764
-19.06%19
-5%