From 3ac391c2083e693e4b0c03e9386f1b201d43ee07 Mon Sep 17 00:00:00 2001 From: benitav Date: Tue, 30 Sep 2025 11:12:32 +0200 Subject: [PATCH 1/2] alpha-feedback-clarifications --- usage/sync-streams.mdx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/usage/sync-streams.mdx b/usage/sync-streams.mdx index af182c59..91f0aff5 100644 --- a/usage/sync-streams.mdx +++ b/usage/sync-streams.mdx @@ -103,8 +103,10 @@ Sync Streams will be supported alongside Sync Rules for the foreseeable future, * Sync Stream definitions. They are currently defined in the same YAML file as Sync Rules: `sync_rules.yaml` (PowerSync Cloud) or `config.yaml` (Open Edition/self-hosted). To enable Sync Streams, add the following configuration: ```yaml sync_rules.yaml - # see https://docs.powersync.com/usage/sync-rules/compatibility#overview config: + # see https://docs.powersync.com/usage/sync-rules/compatibility + # this edition also deploys several backwards-incompatible fixes + # see the docs if you want to disable any specific ones edition: 2 streams: @@ -326,8 +328,10 @@ Select your language for specific examples: stream?.subscription.hasSynced; ``` + This hook is useful when you want to explicitly ensure a stream is active (for example a root component) or when you need progress/hasSynced state; this makes data available for all child components without each query declaring the stream. + Additionally, the `useQuery` hook for React can wait for Sync Streams to be complete before running - queries: + queries. Pass `streams` only when the component knows which specific stream subscription(s) it depends on and it should wait before querying. ```js const results = useQuery( From f4f34303616797da5ac56000f87cc522ffe0993a Mon Sep 17 00:00:00 2001 From: benitav Date: Tue, 30 Sep 2025 11:19:54 +0200 Subject: [PATCH 2/2] wording --- usage/sync-streams.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usage/sync-streams.mdx b/usage/sync-streams.mdx index 91f0aff5..705a75a9 100644 --- a/usage/sync-streams.mdx +++ b/usage/sync-streams.mdx @@ -106,7 +106,7 @@ Sync Streams will be supported alongside Sync Rules for the foreseeable future, config: # see https://docs.powersync.com/usage/sync-rules/compatibility # this edition also deploys several backwards-incompatible fixes - # see the docs if you want to disable any specific ones + # see the docs for details edition: 2 streams: