@ic-reactor/react 1.14.4 → 1.14.5
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.
|
@@ -184,9 +184,7 @@ const actorHooks = (actorManager) => {
|
|
|
184
184
|
if (refetchInterval) {
|
|
185
185
|
intervalId.current = setInterval(call, refetchInterval);
|
|
186
186
|
}
|
|
187
|
-
if (refetchOnMount &&
|
|
188
|
-
state.data === undefined &&
|
|
189
|
-
rest.args !== undefined) {
|
|
187
|
+
if (refetchOnMount && state.data === undefined) {
|
|
190
188
|
call();
|
|
191
189
|
}
|
|
192
190
|
else if (refetchOnMount && state.data !== undefined) {
|
package/dist/helpers/types.d.ts
CHANGED
|
@@ -68,10 +68,15 @@ export interface UseQueryCallParameters<A, M extends FunctionName<A>> extends Us
|
|
|
68
68
|
refetchOnMount?: boolean;
|
|
69
69
|
refetchInterval?: number | false;
|
|
70
70
|
}
|
|
71
|
-
export
|
|
71
|
+
export interface UseQueryCallReturnType<A, M extends FunctionName<A>> extends UseSharedCallReturnType<A, M> {
|
|
72
|
+
refetch: () => void;
|
|
73
|
+
}
|
|
74
|
+
export type UseQueryCall<A> = <M extends FunctionName<A>>(params: UseQueryCallParameters<A, M>) => UseQueryCallReturnType<A, M>;
|
|
72
75
|
export interface UseUpdateCallParameters<A, M extends FunctionName<A>> extends UseSharedCallParameters<A, M> {
|
|
73
76
|
}
|
|
74
|
-
export
|
|
77
|
+
export interface UseUpdateCallReturnType<A, M extends FunctionName<A>> extends UseSharedCallReturnType<A, M> {
|
|
78
|
+
}
|
|
79
|
+
export type UseUpdateCall<A> = <M extends FunctionName<A>>(params: UseUpdateCallParameters<A, M>) => UseUpdateCallReturnType<A, M>;
|
|
75
80
|
export interface DynamicDataArgs<V = unknown> {
|
|
76
81
|
label: string;
|
|
77
82
|
value: V;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ic-reactor/react",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.5",
|
|
4
4
|
"description": "A React library for interacting with Internet Computer canisters",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"react": ">=16.8",
|
|
49
49
|
"zustand": "4.5"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "9c3656c54ea0ee30d6b55c4ff257e708ece99e6e",
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@dfinity/agent": ">=2.1",
|
|
54
54
|
"@dfinity/auth-client": ">=2.1",
|