react-simplikit 0.0.32 → 0.0.33
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.
|
@@ -23,6 +23,11 @@ type UseCounterReturn = {
|
|
|
23
23
|
* @param {number} [options.step=1] - Value to increment or decrement by. Defaults to 1.
|
|
24
24
|
*
|
|
25
25
|
* @returns {UseCounterReturn} An object with count value and control functions.
|
|
26
|
+
* - count `number` - The current count value;
|
|
27
|
+
* - increment `() => void` - A function to increment the count;
|
|
28
|
+
* - decrement `() => void` - A function to decrement the count;
|
|
29
|
+
* - reset `() => void` - A function to reset the count to the initial value;
|
|
30
|
+
* - setCount `(value: number | ((prev: number) => number)) => void` - A function to set the count to a specific value or a function that returns a new value;
|
|
26
31
|
*
|
|
27
32
|
* @example
|
|
28
33
|
* import { useCounter } from 'react-simplikit';
|
|
@@ -23,6 +23,11 @@ type UseCounterReturn = {
|
|
|
23
23
|
* @param {number} [options.step=1] - Value to increment or decrement by. Defaults to 1.
|
|
24
24
|
*
|
|
25
25
|
* @returns {UseCounterReturn} An object with count value and control functions.
|
|
26
|
+
* - count `number` - The current count value;
|
|
27
|
+
* - increment `() => void` - A function to increment the count;
|
|
28
|
+
* - decrement `() => void` - A function to decrement the count;
|
|
29
|
+
* - reset `() => void` - A function to reset the count to the initial value;
|
|
30
|
+
* - setCount `(value: number | ((prev: number) => number)) => void` - A function to set the count to a specific value or a function that returns a new value;
|
|
26
31
|
*
|
|
27
32
|
* @example
|
|
28
33
|
* import { useCounter } from 'react-simplikit';
|