react-simplikit 0.0.18 → 0.0.19
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.
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @param {boolean} [defaultValue=false] - The initial value of the state. Defaults to `false`.
|
|
7
7
|
*
|
|
8
|
-
* @returns {[state: boolean, setTrue: () => void, setFalse: () => void, toggle: () => void]} A tuple containing:
|
|
8
|
+
* @returns {readonly [state: boolean, setTrue: () => void, setFalse: () => void, toggle: () => void]} A tuple containing:
|
|
9
9
|
* - state `boolean` - The current state value;
|
|
10
10
|
* - setTrue `() => void` - A function to set the state to `true`;
|
|
11
11
|
* - setFalse `() => void` - A function to set the state to `false`;
|
|
@@ -27,7 +27,7 @@ type StorageStateOptionsWithDefaultValue<T> = StorageStateOptions<T> & {
|
|
|
27
27
|
* @param {Storage} [options.storage=localStorage] - The storage type (`localStorage` or `sessionStorage`). Defaults to `localStorage`.
|
|
28
28
|
* @param {T} [options.defaultValue] - The initial value if no existing value is found.
|
|
29
29
|
*
|
|
30
|
-
* @returns {[state: Serializable<T> | undefined, setState: (value: SetStateAction<Serializable<T> | undefined>) => void]} A tuple:
|
|
30
|
+
* @returns {readonly [state: Serializable<T> | undefined, setState: (value: SetStateAction<Serializable<T> | undefined>) => void]} A tuple:
|
|
31
31
|
* - state `Serializable<T> | undefined` - The current state value retrieved from storage;
|
|
32
32
|
* - setState `(value: SetStateAction<Serializable<T> | undefined>) => void` - A function to update and persist the state;
|
|
33
33
|
*
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @param {boolean} [defaultValue=false] - The initial value of the state. Defaults to `false`.
|
|
7
7
|
*
|
|
8
|
-
* @returns {[state: boolean, setTrue: () => void, setFalse: () => void, toggle: () => void]} A tuple containing:
|
|
8
|
+
* @returns {readonly [state: boolean, setTrue: () => void, setFalse: () => void, toggle: () => void]} A tuple containing:
|
|
9
9
|
* - state `boolean` - The current state value;
|
|
10
10
|
* - setTrue `() => void` - A function to set the state to `true`;
|
|
11
11
|
* - setFalse `() => void` - A function to set the state to `false`;
|
|
@@ -27,7 +27,7 @@ type StorageStateOptionsWithDefaultValue<T> = StorageStateOptions<T> & {
|
|
|
27
27
|
* @param {Storage} [options.storage=localStorage] - The storage type (`localStorage` or `sessionStorage`). Defaults to `localStorage`.
|
|
28
28
|
* @param {T} [options.defaultValue] - The initial value if no existing value is found.
|
|
29
29
|
*
|
|
30
|
-
* @returns {[state: Serializable<T> | undefined, setState: (value: SetStateAction<Serializable<T> | undefined>) => void]} A tuple:
|
|
30
|
+
* @returns {readonly [state: Serializable<T> | undefined, setState: (value: SetStateAction<Serializable<T> | undefined>) => void]} A tuple:
|
|
31
31
|
* - state `Serializable<T> | undefined` - The current state value retrieved from storage;
|
|
32
32
|
* - setState `(value: SetStateAction<Serializable<T> | undefined>) => void` - A function to update and persist the state;
|
|
33
33
|
*
|