@ic-reactor/react 1.14.3 → 1.14.4
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,7 +184,9 @@ const actorHooks = (actorManager) => {
|
|
|
184
184
|
if (refetchInterval) {
|
|
185
185
|
intervalId.current = setInterval(call, refetchInterval);
|
|
186
186
|
}
|
|
187
|
-
if (refetchOnMount &&
|
|
187
|
+
if (refetchOnMount &&
|
|
188
|
+
state.data === undefined &&
|
|
189
|
+
rest.args !== undefined) {
|
|
188
190
|
call();
|
|
189
191
|
}
|
|
190
192
|
else if (refetchOnMount && state.data !== undefined) {
|
|
@@ -199,7 +201,10 @@ const actorHooks = (actorManager) => {
|
|
|
199
201
|
}
|
|
200
202
|
return () => clearInterval(intervalId.current);
|
|
201
203
|
}, [refetchInterval, refetchOnMount, requestKey]);
|
|
202
|
-
|
|
204
|
+
const refetch = () => {
|
|
205
|
+
call();
|
|
206
|
+
};
|
|
207
|
+
return Object.assign({ call, refetch, intervalId, requestKey }, state);
|
|
203
208
|
};
|
|
204
209
|
const useUpdateCall = useSharedCall;
|
|
205
210
|
const useMethod = (params) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ic-reactor/react",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.4",
|
|
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": "2e2fe22cf2af159584739cad5169022f6cb6d58c",
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@dfinity/agent": ">=2.1",
|
|
54
54
|
"@dfinity/auth-client": ">=2.1",
|