@raf-query/react 0.0.15 → 0.0.17
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/CHANGELOG.md +13 -1
- package/README.md +5 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.17](https://github.com/KATT/raf-query/compare/0.0.16...0.0.17) (2026-10-12)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **core:** pause retries while the browser is offline ([#18](https://github.com/KATT/raf-query/issues/18)) ([a25c664](https://github.com/KATT/raf-query/commit/a25c664359fe7248cdc8d91a14d524e37b467c6c))
|
|
8
|
+
|
|
9
|
+
## [0.0.16](https://github.com/KATT/raf-query/compare/0.0.15...0.0.16) (2026-10-12)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- **core:** don't revalidate cached data in server verbs ([#19](https://github.com/KATT/raf-query/issues/19)) ([0ed7d9f](https://github.com/KATT/raf-query/commit/0ed7d9fefd0b70a8aa9a85c8d2c309a9fed42903))
|
|
14
|
+
|
|
3
15
|
## [0.0.15](https://github.com/KATT/raf-query/compare/0.0.14...0.0.15) (2026-10-12)
|
|
4
16
|
|
|
5
|
-
|
|
17
|
+
- **agent-docs:** replace local ~/dev path with upstream React link ([#17](https://github.com/KATT/raf-query/issues/17)) ([79c0314](https://github.com/KATT/raf-query/commit/79c031475c3ed62ce5a07fb91d68733534e452b3))
|
|
6
18
|
|
|
7
19
|
## [0.0.14](https://github.com/KATT/raf-query/compare/0.0.13...0.0.14) (2026-10-12)
|
|
8
20
|
|
package/README.md
CHANGED
|
@@ -113,6 +113,7 @@ Behavior:
|
|
|
113
113
|
|
|
114
114
|
- Every verb dedupes against the cache. A fresh entry is reused; a stale entry is refetched in the background.
|
|
115
115
|
- `ensure` and `fetch` wait only on a cache miss. With stale cached data they resolve immediately and revalidate in the background.
|
|
116
|
+
- On the server, cached data is always reused, whatever `staleTime` says. A server client renders once, so a background refetch could only repeat a request whose result is never shown. Entries marked by `invalidate` still refetch.
|
|
116
117
|
- A failed `prefetch` never throws out of the loader. The error surfaces where the data is read, and is reported to the client's `onError`.
|
|
117
118
|
- A failed `ensure` or `fetch` rejects, so it reaches the route's error boundary.
|
|
118
119
|
|
|
@@ -445,7 +446,7 @@ export default async function Page(props: {
|
|
|
445
446
|
- `getQueryClient` is scoped to one request by React's `cache()`.
|
|
446
447
|
- `HydrationBoundary` sends the request client's entries to the browser cache; pending ones stream as promises. Render one in each server component that starts queries for client components. Entries already sent in this request are skipped.
|
|
447
448
|
- `QueryProvider` creates the browser client, and streams queries that client components start during SSR (`useWaterfall`) into the HTML. Pass `config` for the client's options; it must be serializable.
|
|
448
|
-
- Server components that only render data can `await qc.fetch(...)` anywhere; the per-request client
|
|
449
|
+
- Server components that only render data can `await qc.fetch(...)` anywhere; the per-request client makes one request per query, whatever its `staleTime`.
|
|
449
450
|
- `fetch` returns data, not a handle. When a server component renders the data and also hands the query to a client component, pass `await qc.ensure(...)`: after the `fetch` it resolves from the cache, and the client component gets the data from `useQuery` without a promise.
|
|
450
451
|
- Factories can call server actions: server components call them directly, and the browser calls them on refetch. Validate their arguments, since anyone can call them.
|
|
451
452
|
|
|
@@ -540,7 +541,7 @@ Both render nothing on the server, since the server's cache isn't the browser's.
|
|
|
540
541
|
| `getAll()`, `getQuery(factory, input?)` | Cache entries, for devtools and integrations |
|
|
541
542
|
| `clear()` | Drop every entry and abort in-flight requests |
|
|
542
543
|
| `mount()` | Start window-focus and reconnect refetching. The providers call it |
|
|
543
|
-
| `isServer` | Detected from `window`. Server clients don't retry, never gc, skip stale timers
|
|
544
|
+
| `isServer` | Detected from `window`. Server clients don't retry, never gc, skip stale timers, and never revalidate cached data |
|
|
544
545
|
|
|
545
546
|
Query options, accepted by `queryOptions`, `infiniteQueryOptions` and `config.defaults`:
|
|
546
547
|
|
|
@@ -555,6 +556,8 @@ Query options, accepted by `queryOptions`, `infiniteQueryOptions` and `config.de
|
|
|
555
556
|
|
|
556
557
|
`infiniteQueryOptions` also takes `getPreviousPageParam` and `maxPages`.
|
|
557
558
|
|
|
559
|
+
In the browser, retries pause while `navigator.onLine` is `false`: after the retry delay, the next attempt waits for the window's `online` event. The request stays fetching meanwhile, and cancelling it (`remove`, `clear`, a restart) stops the wait. The first attempt runs regardless.
|
|
560
|
+
|
|
558
561
|
`@raf-query/core`:
|
|
559
562
|
|
|
560
563
|
| Export | Use |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raf-query/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "React bindings for raf-query, a render-as-you-fetch query library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"query",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"./tanstack-router": "./dist/tanstack-router.mjs"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@raf-query/core": "0.0.
|
|
43
|
+
"@raf-query/core": "0.0.17",
|
|
44
44
|
"effect": "^4.0.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|