@defjs/react 0.0.4 → 0.0.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.
- package/README.md +4 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Keeping SDK definitions in their own package means the SDK needs no React depend
|
|
|
10
10
|
bun add @defjs/core @defjs/react react
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
The package is ESM and requires `@defjs/core` as a peer in the `^0.
|
|
13
|
+
The package is ESM and requires `@defjs/core` as a peer in the `^0.8.0` range.
|
|
14
14
|
|
|
15
15
|
## Quick start
|
|
16
16
|
|
|
@@ -59,10 +59,10 @@ export function OrderProfile({ id }: { id: number }) {
|
|
|
59
59
|
const abort = new AbortController();
|
|
60
60
|
|
|
61
61
|
void getOrder(client({ signal: abort.signal }), { id }).then(
|
|
62
|
-
([
|
|
62
|
+
([err, order]) => {
|
|
63
63
|
if (abort.signal.aborted) return;
|
|
64
|
-
if (
|
|
65
|
-
setName(
|
|
64
|
+
if (err) {
|
|
65
|
+
setName(err.message);
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
setName(order.status);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defjs/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Provide an existing Defjs client to a React tree.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/defjs/defjs/issues"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"main": "./index.js",
|
|
15
15
|
"types": "./index.d.ts",
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@defjs/core": "^0.
|
|
17
|
+
"@defjs/core": "^0.8.0",
|
|
18
18
|
"react": ">=18.0.0"
|
|
19
19
|
},
|
|
20
20
|
"module": "./index.js",
|