@pushwoosh/kit-helpers 4.3.1 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
const
|
|
2
|
+
const useDelayedEffect = (effect, deps, delay) => {
|
|
3
3
|
useEffect(() => {
|
|
4
4
|
const id = setTimeout(effect, delay);
|
|
5
5
|
return () => clearTimeout(id);
|
|
6
6
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7
7
|
}, deps);
|
|
8
8
|
};
|
|
9
|
-
export default
|
|
9
|
+
export default useDelayedEffect;
|
package/index.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export { default as useUnmount } from './hooks/useUnmount';
|
|
|
9
9
|
export { default as useAsync } from './hooks/useAsync';
|
|
10
10
|
export { default as useAsyncFn } from './hooks/useAsyncFn';
|
|
11
11
|
export { default as useDebounce } from './hooks/useDelayedValue';
|
|
12
|
-
export { default as useEffectDebounced } from './hooks/
|
|
12
|
+
export { default as useEffectDebounced } from './hooks/useDelayedEffect';
|
package/index.js
CHANGED
|
@@ -9,4 +9,4 @@ export { default as useUnmount } from './hooks/useUnmount';
|
|
|
9
9
|
export { default as useAsync } from './hooks/useAsync';
|
|
10
10
|
export { default as useAsyncFn } from './hooks/useAsyncFn';
|
|
11
11
|
export { default as useDebounce } from './hooks/useDelayedValue';
|
|
12
|
-
export { default as useEffectDebounced } from './hooks/
|
|
12
|
+
export { default as useEffectDebounced } from './hooks/useDelayedEffect';
|
package/package.json
CHANGED