@myna-sh/react 0.3.0 → 0.4.0
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 +6 -6
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -70,15 +70,15 @@ Each returns `{ data, error, isLoading, isValidating, refetch }` and accepts the
|
|
|
70
70
|
| `staleMs` | How long a cached value stays fresh before a background refetch. Default 30s |
|
|
71
71
|
| `suspense` | Throw the in-flight promise so a `<Suspense>` boundary handles loading |
|
|
72
72
|
|
|
73
|
-
## Behavior
|
|
73
|
+
## Behavior
|
|
74
74
|
|
|
75
|
-
- **
|
|
76
|
-
- **A failed refresh
|
|
77
|
-
- **
|
|
75
|
+
- **Requests are shared.** Components requesting the same collection with the same options produce one HTTP request.
|
|
76
|
+
- **A failed refresh keeps the previous value.** `data` holds the last successful result and `error` is set alongside it.
|
|
77
|
+
- **Preview tokens propagate.** A token on the provider's client applies to every hook beneath it, and reads return the collection as it would be published.
|
|
78
78
|
|
|
79
|
-
##
|
|
79
|
+
## Using another data library
|
|
80
80
|
|
|
81
|
-
If
|
|
81
|
+
If your app already uses TanStack Query or SWR, call `@myna-sh/sdk` from it directly rather than adding these hooks — two caches holding the same content will disagree.
|
|
82
82
|
|
|
83
83
|
## Links
|
|
84
84
|
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myna-sh/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"LICENSE"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@myna-sh/sdk": "^0.
|
|
25
|
+
"@myna-sh/sdk": "^0.4.0",
|
|
26
26
|
"react": ">=18"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"eslint": "9.39.5",
|
|
32
32
|
"react": "19.2.8",
|
|
33
33
|
"typescript": "5.9.3",
|
|
34
|
-
"@myna-sh/
|
|
35
|
-
"@myna-sh/
|
|
34
|
+
"@myna-sh/config": "0.0.0",
|
|
35
|
+
"@myna-sh/sdk": "0.4.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsup",
|