@ic-reactor/react 1.4.2 → 1.4.3

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.
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Hook for making update calls to actors, handling loading states, and managing errors. It supports custom event handlers for loading, success, and error events.
2
+ * Hook for making dynamically update or query calls to actors, handling loading states, and managing errors. It supports custom event handlers for loading, success, and error events.
3
3
  *
4
4
  * @param options Configuration object for the actor method call, including the method name, arguments, and event handlers.
5
5
  * @returns An object containing the method call function, a reset function to reset the call state to its default, and the current call state (data, error, loading, call, reset).
6
6
  * @example
7
7
  * ```tsx
8
- * function UpdateCallComponent() {
9
- * const { call, data, loading } = useUpdateCall({
8
+ * function MethodCallComponent() {
9
+ * const { call, data, loading } = useMethod({
10
10
  * functionName: 'updateUserProfile',
11
11
  * args: ['123', { name: 'John Doe' }],
12
12
  * onLoading: (loading) => console.log('Loading:', loading),
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useMethod = void 0;
4
4
  const hooks_1 = require("./hooks");
5
5
  /**
6
- * Hook for making update calls to actors, handling loading states, and managing errors. It supports custom event handlers for loading, success, and error events.
6
+ * Hook for making dynamically update or query calls to actors, handling loading states, and managing errors. It supports custom event handlers for loading, success, and error events.
7
7
  *
8
8
  * @param options Configuration object for the actor method call, including the method name, arguments, and event handlers.
9
9
  * @returns An object containing the method call function, a reset function to reset the call state to its default, and the current call state (data, error, loading, call, reset).
10
10
  * @example
11
11
  * ```tsx
12
- * function UpdateCallComponent() {
13
- * const { call, data, loading } = useUpdateCall({
12
+ * function MethodCallComponent() {
13
+ * const { call, data, loading } = useMethod({
14
14
  * functionName: 'updateUserProfile',
15
15
  * args: ['123', { name: 'John Doe' }],
16
16
  * onLoading: (loading) => console.log('Loading:', loading),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ic-reactor/react",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
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.4.0",
38
+ "@ic-reactor/core": "^1.4.1",
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": "427c0ef64603d30030f5da64ed0ea7840f4041b0"
50
+ "gitHead": "86cb46dd7015edaed6b82601ff83e07ed8f43c99"
51
51
  }