@ic-reactor/react 1.7.6 → 1.7.7

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.
@@ -157,7 +157,7 @@ const actorHooks = (actorManager) => {
157
157
  }
158
158
  return () => clearInterval(intervalId.current);
159
159
  }, [refetchInterval, refetchOnMount]);
160
- return Object.assign({ call }, state);
160
+ return Object.assign({ call, intervalId }, state);
161
161
  };
162
162
  const useUpdateCall = useSharedCall;
163
163
  const useMethod = (params) => {
@@ -4,13 +4,13 @@
4
4
  * @example
5
5
  * ```jsx
6
6
  * function AuthStateComponent() {
7
- * const { isAuthenticated, authenticating, identity, error } = useAuthState();
7
+ * const { authenticated, authenticating, identity, error } = useAuthState();
8
8
  *
9
9
  * return (
10
10
  * <div>
11
11
  * {authenticating ? 'Authenticating...' : ''}
12
12
  * {error ? `Error: ${error.message}` : ''}
13
- * {isAuthenticated ? `User ${identity?.getPrincipal()} is authenticated.` : 'User is not authenticated.'}
13
+ * {authenticated ? `User ${identity?.getPrincipal()} is authenticated.` : 'User is not authenticated.'}
14
14
  * </div>
15
15
  * );
16
16
  * }
@@ -11,13 +11,13 @@ const hooks_1 = __importDefault(require("./hooks"));
11
11
  * @example
12
12
  * ```jsx
13
13
  * function AuthStateComponent() {
14
- * const { isAuthenticated, authenticating, identity, error } = useAuthState();
14
+ * const { authenticated, authenticating, identity, error } = useAuthState();
15
15
  *
16
16
  * return (
17
17
  * <div>
18
18
  * {authenticating ? 'Authenticating...' : ''}
19
19
  * {error ? `Error: ${error.message}` : ''}
20
- * {isAuthenticated ? `User ${identity?.getPrincipal()} is authenticated.` : 'User is not authenticated.'}
20
+ * {authenticated ? `User ${identity?.getPrincipal()} is authenticated.` : 'User is not authenticated.'}
21
21
  * </div>
22
22
  * );
23
23
  * }
@@ -167,7 +167,7 @@ const useActor = (config) => {
167
167
  return;
168
168
  }
169
169
  if (!candidAdapter) {
170
- throw new Error("CandidAdapter is necessary to fetch the Candid interface. Please ensure your application is wrapped with the CandidAdapterProvider!");
170
+ throw new Error("CandidAdapter is necessary to fetch the Candid interface. Please ensure your application is wrapped with the CandidAdapterProvider, or provide the idlFactory directly.");
171
171
  }
172
172
  let idlFactory;
173
173
  if (candidString) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ic-reactor/react",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
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",
@@ -35,7 +35,7 @@
35
35
  "node": ">=10"
36
36
  },
37
37
  "dependencies": {
38
- "@ic-reactor/core": "^1.7.3",
38
+ "@ic-reactor/core": "^1.7.4",
39
39
  "zustand-utils": "^1.3"
40
40
  },
41
41
  "peerDependencies": {
@@ -47,5 +47,5 @@
47
47
  "react": ">=16.8",
48
48
  "zustand": "4.5"
49
49
  },
50
- "gitHead": "21ff3717f422184cc9b71f4ce10a49e1ec59be8f"
50
+ "gitHead": "b29be90830729f198c63164041141e35ee0aaafa"
51
51
  }