@raf-query/react 0.10.2 → 0.10.4

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 CHANGED
@@ -1,11 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.10.4](https://github.com/KATT/raf-query/compare/0.10.3...0.10.4) (2026-10-16)
4
+
5
+ ### Bug Fixes
6
+
7
+ * **core:** keep pages written during a paged refetch ([#215](https://github.com/KATT/raf-query/issues/215)) ([b6a5946](https://github.com/KATT/raf-query/commit/b6a5946e806e12e9b7df40e80ef0e532c0871b25)), references [#75](https://github.com/KATT/raf-query/issues/75)
8
+ * **react:** read promise queryFns as plain data on a client with a layer (1/2) ([#205](https://github.com/KATT/raf-query/issues/205)) ([a9b156e](https://github.com/KATT/raf-query/commit/a9b156edfa18b1e41e9ea929afc412252a61b83c))
9
+
10
+ ## [0.10.3](https://github.com/KATT/raf-query/compare/0.10.2...0.10.3) (2026-10-16)
11
+
12
+ ### Features
13
+
14
+ - **core:** add QueryBinding, a framework-free useQuery for bindings ([#197](https://github.com/KATT/raf-query/issues/197)) ([4865802](https://github.com/KATT/raf-query/commit/48658024f4d21d43ce8274de379a19c8898b6173)), references [#194](https://github.com/KATT/raf-query/issues/194)
15
+
3
16
  ## [0.10.2](https://github.com/KATT/raf-query/compare/0.10.1...0.10.2) (2026-10-16)
4
17
 
5
18
  ### Features
6
19
 
7
- * **react:** re-render useQuery readers of the thenable's status when the first load settles (2/3) ([#198](https://github.com/KATT/raf-query/issues/198)) ([436d83c](https://github.com/KATT/raf-query/commit/436d83cfd6a3944265eb56d5597c322342c5a6c6))
8
- * **react:** type useQuery's promise as a Thenable (1/3) ([#200](https://github.com/KATT/raf-query/issues/200)) ([47e5309](https://github.com/KATT/raf-query/commit/47e530957565a2bd345642ae7a4be5d3c501ffb2))
20
+ - **react:** re-render useQuery readers of the thenable's status when the first load settles (2/3) ([#198](https://github.com/KATT/raf-query/issues/198)) ([436d83c](https://github.com/KATT/raf-query/commit/436d83cfd6a3944265eb56d5597c322342c5a6c6))
21
+ - **react:** type useQuery's promise as a Thenable (1/3) ([#200](https://github.com/KATT/raf-query/issues/200)) ([47e5309](https://github.com/KATT/raf-query/commit/47e530957565a2bd345642ae7a4be5d3c501ffb2))
9
22
 
10
23
  ## [0.10.1](https://github.com/KATT/raf-query/compare/0.10.0...0.10.1) (2026-10-16)
11
24
 
@@ -1,13 +1,9 @@
1
1
  "use client";
2
2
  import { useQueryClient } from "./provider.mjs";
3
3
  import { assertSent } from "./query-provider/browser-requests.mjs";
4
- import { Query, QueryObserver, promiseControls, resultThenable } from "@raf-query/core";
4
+ import { Query, QueryBinding, QueryObserver, promiseControls, resultThenable, throwsOnError } from "@raf-query/core";
5
5
  import { use, useEffect, useState, useSyncExternalStore } from "react";
6
6
  //#region src/use-query.ts
7
- function queryFor(client, factory, input) {
8
- const args = [input];
9
- return client.getQuery(factory, ...args);
10
- }
11
7
  function storeFor(query, options) {
12
8
  const observer = QueryObserver.makeUnsafe(query, options);
13
9
  return {
@@ -18,7 +14,7 @@ function storeFor(query, options) {
18
14
  }
19
15
  function useQuery(factory, handle, options = {}) {
20
16
  const client = useQueryClient();
21
- const query = queryFor(client, factory, handle.input);
17
+ const query = QueryBinding.queryFor(client, factory, handle);
22
18
  assertSent(client, query);
23
19
  Query.readUnsafe(query);
24
20
  const refetchInterval = options.refetchInterval;
@@ -46,7 +42,7 @@ function useQuery(factory, handle, options = {}) {
46
42
  ]);
47
43
  QueryObserver.trackProp(observer, "promise");
48
44
  const controls = promiseControls(QueryObserver.trackResult(observer, result));
49
- const throwOnError = options.throwOnError ?? client.throwOnError;
45
+ const throwOnError = throwsOnError(query, options.throwOnError ?? client.throwOnError);
50
46
  const withData = "data" in handle;
51
47
  if (!throwOnError) {
52
48
  const resultPromise = resultThenable(result.promise);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raf-query/react",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "React bindings for raf-query, a render-as-you-fetch query library",
5
5
  "keywords": [
6
6
  "query",
@@ -48,7 +48,7 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@raf-query/core": "0.10.2"
51
+ "@raf-query/core": "0.10.4"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@tanstack/react-router": "^1.170.0",