@trackunit/react-core-hooks 1.3.22 → 1.3.28

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.
package/index.cjs.js CHANGED
@@ -912,7 +912,7 @@ const initLocalStorageState = ({ key, defaultState, schema, }) => {
912
912
  const previousColor = usePrevious(color);
913
913
  */
914
914
  const usePrevious = (value) => {
915
- const ref = react.useRef();
915
+ const ref = react.useRef(undefined);
916
916
  react.useEffect(() => {
917
917
  ref.current = value;
918
918
  }, [value]);
package/index.esm.js CHANGED
@@ -910,7 +910,7 @@ const initLocalStorageState = ({ key, defaultState, schema, }) => {
910
910
  const previousColor = usePrevious(color);
911
911
  */
912
912
  const usePrevious = (value) => {
913
- const ref = useRef();
913
+ const ref = useRef(undefined);
914
914
  useEffect(() => {
915
915
  ref.current = value;
916
916
  }, [value]);
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-hooks",
3
- "version": "1.3.22",
3
+ "version": "1.3.28",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
7
7
  "node": ">=20.x"
8
8
  },
9
9
  "dependencies": {
10
- "react": "18.3.1",
10
+ "react": "19.0.0",
11
11
  "jest-fetch-mock": "^3.0.3",
12
12
  "zod": "3.22.4",
13
- "@trackunit/react-core-contexts-api": "1.4.22",
14
- "@trackunit/iris-app-runtime-core": "1.4.22",
15
- "@trackunit/shared-utils": "1.5.21"
13
+ "@trackunit/react-core-contexts-api": "1.4.28",
14
+ "@trackunit/iris-app-runtime-core": "1.4.28",
15
+ "@trackunit/shared-utils": "1.5.27"
16
16
  },
17
17
  "module": "./index.esm.js",
18
18
  "main": "./index.cjs.js",
@@ -1,4 +1,3 @@
1
- import { Dispatch } from "react";
2
1
  import { LocalStorageCallbacks, LocalStorageParams } from "./types";
3
2
  /**
4
3
  * Works like a normal useReducer, but saves to local storage and has optional schema validation.
@@ -10,4 +9,4 @@ import { LocalStorageCallbacks, LocalStorageParams } from "./types";
10
9
  */
11
10
  export declare const useLocalStorageReducer: <TState, TAction>({ key, defaultState, reducer, schema, onValidationFailed, onValidationSuccessful, }: {
12
11
  reducer: (state: TState, action: TAction) => TState;
13
- } & LocalStorageParams<TState> & LocalStorageCallbacks<TState>) => readonly [TState, Dispatch<TAction>];
12
+ } & LocalStorageParams<TState> & LocalStorageCallbacks<TState>) => readonly [TState, import("react").ActionDispatch<[action: TAction]>];