From 66660b3a06699e49d2f25878ac75af170bee318e Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2026 13:11:51 +0000 Subject: [PATCH 1/2] docs: document fetchReason on React useQuery result --- client-sdks/frameworks/react.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-sdks/frameworks/react.mdx b/client-sdks/frameworks/react.mdx index cd98ccee6..ff427ba97 100644 --- a/client-sdks/frameworks/react.mdx +++ b/client-sdks/frameworks/react.mdx @@ -10,7 +10,7 @@ The `@powersync/react` package provides React hooks for use with the [JavaScript The main hooks available are: -- `useQuery`: This allows you to access the results of a watched query. The response includes `isLoading`, `isFetching` and `error` properties. +- `useQuery`: This allows you to access the results of a watched query. The response includes `isLoading`, `isFetching`, `fetchReason` and `error` properties. While `isFetching` is true, `fetchReason` is `'initial'`, `'refresh'`, `'tables-changed'` or `'settings-changed'`. `'settings-changed'` means the SQL, parameters or options changed, and `data` still holds the previous query's rows until the updated query returns its first result. - `useStatus`: Access the PowerSync connectivity status. This can be used to update the UI based on whether the client is connected or not. - `useSuspenseQuery`: This hook also allows you to access the results of a watched query, but its loading and fetching states are handled through [Suspense](https://react.dev/reference/react/Suspense). It automatically converts certain loading/fetching states into Suspense signals, triggering Suspense boundaries in parent components. From e7100f86c0516435dd930759425bdb5448ff3f05 Mon Sep 17 00:00:00 2001 From: Benita Volkmann Date: Mon, 26 Oct 2026 10:27:06 +0200 Subject: [PATCH 2/2] Polish --- client-sdks/frameworks/react.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-sdks/frameworks/react.mdx b/client-sdks/frameworks/react.mdx index ff427ba97..eeee70f56 100644 --- a/client-sdks/frameworks/react.mdx +++ b/client-sdks/frameworks/react.mdx @@ -10,7 +10,7 @@ The `@powersync/react` package provides React hooks for use with the [JavaScript The main hooks available are: -- `useQuery`: This allows you to access the results of a watched query. The response includes `isLoading`, `isFetching`, `fetchReason` and `error` properties. While `isFetching` is true, `fetchReason` is `'initial'`, `'refresh'`, `'tables-changed'` or `'settings-changed'`. `'settings-changed'` means the SQL, parameters or options changed, and `data` still holds the previous query's rows until the updated query returns its first result. +- `useQuery`: This allows you to access the results of a watched query. The response includes `isLoading`, `isFetching`, `fetchReason` and `error` properties. While `isFetching` is true, `fetchReason` is `'initial'`, `'refresh'` (after calling `refresh()` on a `runQueryOnce` query), `'tables-changed'` or `'settings-changed'`. `'settings-changed'` means the SQL, parameters or options changed, and `data` still holds the previous query's rows until the updated query returns its first result. `fetchReason` requires `@powersync/react` 2.1.0 or later. - `useStatus`: Access the PowerSync connectivity status. This can be used to update the UI based on whether the client is connected or not. - `useSuspenseQuery`: This hook also allows you to access the results of a watched query, but its loading and fetching states are handled through [Suspense](https://react.dev/reference/react/Suspense). It automatically converts certain loading/fetching states into Suspense signals, triggering Suspense boundaries in parent components.