@aave/react 4.0.0-next.2 → 4.0.0-next.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.
- package/README.md +22 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -58,13 +58,33 @@ That's it—you can now start using AaveKit React hooks.
|
|
|
58
58
|
|
|
59
59
|
```tsx
|
|
60
60
|
function ChainsList() {
|
|
61
|
-
const { data,
|
|
62
|
-
|
|
61
|
+
const { data, loading, error } = useChains();
|
|
63
62
|
|
|
64
63
|
if (loading) return <div>Loading…</div>;
|
|
65
64
|
|
|
66
65
|
if (error) return <div>Error: {error.message}</div>;
|
|
67
66
|
|
|
67
|
+
return (
|
|
68
|
+
<div>
|
|
69
|
+
{data.map((chain) => (
|
|
70
|
+
<div key={chain.id}>{chain.name}</div>
|
|
71
|
+
))}
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### React Suspense
|
|
78
|
+
|
|
79
|
+
Let React handle loading states automatically through a [Suspense boundary](https://react.dev/reference/react/Suspense).
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
// Component - no loading states needed
|
|
83
|
+
function ChainsList() {
|
|
84
|
+
const { data: chains } = useChains({
|
|
85
|
+
suspense: true, // Enable suspense mode
|
|
86
|
+
});
|
|
87
|
+
|
|
68
88
|
return (
|
|
69
89
|
<div>
|
|
70
90
|
{chains.map((chain) => (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aave/react",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.3",
|
|
4
4
|
"description": "The official React bindings for the Aave Protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aave",
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"sideEffects": false,
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"urql": "^5.0.1",
|
|
75
|
-
"@aave/
|
|
76
|
-
"@aave/
|
|
77
|
-
"@aave/
|
|
78
|
-
"@aave/
|
|
75
|
+
"@aave/core": "1.0.0-next.2",
|
|
76
|
+
"@aave/client": "4.0.0-next.3",
|
|
77
|
+
"@aave/graphql": "1.0.0-next.3",
|
|
78
|
+
"@aave/types": "1.0.0-next.2"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@privy-io/react-auth": "^2.20.0",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
},
|
|
121
121
|
"license": "MIT",
|
|
122
122
|
"publishConfig": {
|
|
123
|
-
"access": "
|
|
123
|
+
"access": "public"
|
|
124
124
|
},
|
|
125
125
|
"scripts": {
|
|
126
126
|
"build": "tsup"
|