@gateweb/react-utils 2.5.0 → 2.6.0

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.
@@ -269,6 +269,8 @@ type TValueOptions<T> = AtLeastOne<{
269
269
  * const [currentValue, setCurrentValue] = useValue({ value });
270
270
  * };
271
271
  * ```
272
+ *
273
+ * @deprecated This hook is deprecated in favor of `useControllableState`, which provides more features and better performance. Please use `useControllableState` instead.
272
274
  */
273
275
  declare const useValue: <T>({ value, defaultValue }: TValueOptions<T>) => readonly [T, (newValue: T) => void];
274
276
 
@@ -74,6 +74,8 @@ var React__default = /*#__PURE__*/_interopDefault(React);
74
74
  * const [currentValue, setCurrentValue] = useValue({ value });
75
75
  * };
76
76
  * ```
77
+ *
78
+ * @deprecated This hook is deprecated in favor of `useControllableState`, which provides more features and better performance. Please use `useControllableState` instead.
77
79
  */ const useValue = ({ value, defaultValue })=>{
78
80
  if (value === undefined && defaultValue === undefined) {
79
81
  throw new Error('Either `value` or `defaultValue` must be provided.');
@@ -269,6 +269,8 @@ type TValueOptions<T> = AtLeastOne<{
269
269
  * const [currentValue, setCurrentValue] = useValue({ value });
270
270
  * };
271
271
  * ```
272
+ *
273
+ * @deprecated This hook is deprecated in favor of `useControllableState`, which provides more features and better performance. Please use `useControllableState` instead.
272
274
  */
273
275
  declare const useValue: <T>({ value, defaultValue }: TValueOptions<T>) => readonly [T, (newValue: T) => void];
274
276
 
@@ -68,6 +68,8 @@ export { g as getLocalStorage, s as setLocalStorage } from './webStorage-12s-Bo7
68
68
  * const [currentValue, setCurrentValue] = useValue({ value });
69
69
  * };
70
70
  * ```
71
+ *
72
+ * @deprecated This hook is deprecated in favor of `useControllableState`, which provides more features and better performance. Please use `useControllableState` instead.
71
73
  */ const useValue = ({ value, defaultValue })=>{
72
74
  if (value === undefined && defaultValue === undefined) {
73
75
  throw new Error('Either `value` or `defaultValue` must be provided.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gateweb/react-utils",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "React Utils for GateWeb",
5
5
  "homepage": "https://github.com/GW-VAT-BPSP-Team/react-utils",
6
6
  "repository": {