react-simplikit 0.0.20 → 0.0.22
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.
|
@@ -12,7 +12,7 @@ type DebounceOptions = {
|
|
|
12
12
|
* `useDebounce` is a React hook that returns a debounced version of the provided callback function.
|
|
13
13
|
* It helps optimize event handling by delaying function execution and grouping multiple calls into one.
|
|
14
14
|
*
|
|
15
|
-
* @template {(...args:
|
|
15
|
+
* @template {(...args: any[]) => unknown} F - The type of the callback function.
|
|
16
16
|
* @param {F} callback - The function to debounce.
|
|
17
17
|
* @param {number} wait - The number of milliseconds to delay the function execution.
|
|
18
18
|
* @param {DebounceOptions} [options] - Configuration options for debounce behavior.
|
|
@@ -5,6 +5,8 @@ type NotNullishValue = {};
|
|
|
5
5
|
* when it hasn't changed, while ensuring you can safely use the latest state.
|
|
6
6
|
* It prevents unnecessary re-renders while always allowing access to the latest data.
|
|
7
7
|
*
|
|
8
|
+
* @template {NotNullishValue} T - The type of target to be referenced.
|
|
9
|
+
*
|
|
8
10
|
* @param {T} value - The value to maintain the reference for. It returns a new reference
|
|
9
11
|
* if the state value changes after comparison.
|
|
10
12
|
* @param {(a: T, b: T) => boolean} [areValuesEqual] - An optional function to determine
|
|
@@ -12,7 +12,7 @@ type DebounceOptions = {
|
|
|
12
12
|
* `useDebounce` is a React hook that returns a debounced version of the provided callback function.
|
|
13
13
|
* It helps optimize event handling by delaying function execution and grouping multiple calls into one.
|
|
14
14
|
*
|
|
15
|
-
* @template {(...args:
|
|
15
|
+
* @template {(...args: any[]) => unknown} F - The type of the callback function.
|
|
16
16
|
* @param {F} callback - The function to debounce.
|
|
17
17
|
* @param {number} wait - The number of milliseconds to delay the function execution.
|
|
18
18
|
* @param {DebounceOptions} [options] - Configuration options for debounce behavior.
|
|
@@ -5,6 +5,8 @@ type NotNullishValue = {};
|
|
|
5
5
|
* when it hasn't changed, while ensuring you can safely use the latest state.
|
|
6
6
|
* It prevents unnecessary re-renders while always allowing access to the latest data.
|
|
7
7
|
*
|
|
8
|
+
* @template {NotNullishValue} T - The type of target to be referenced.
|
|
9
|
+
*
|
|
8
10
|
* @param {T} value - The value to maintain the reference for. It returns a new reference
|
|
9
11
|
* if the state value changes after comparison.
|
|
10
12
|
* @param {(a: T, b: T) => boolean} [areValuesEqual] - An optional function to determine
|