diff --git a/docs/content/state/v3/react/react-api.mdx b/docs/content/state/v3/react/react-api.mdx index d517f0f..a7c0458 100644 --- a/docs/content/state/v3/react/react-api.mdx +++ b/docs/content/state/v3/react/react-api.mdx @@ -6,12 +6,12 @@ title: React API ### useValue - -In previous versions this was called useValue or use$. If you were using `useValue` or `use$` it will still work for a while, but we suggest changing them to `useValue` as we'll remove `useValue` in a later version. Many people were unsure of what a "selector" was so it was unclear what it did. Plus, `useValue` is shorter 😀 + +In previous versions this was called useSelector or use$. If you were using `useSelector` or `use$` it will still work for a while, but we suggest changing them to `useValue` as we'll remove `useSelector` in a later version. Many people were unsure of what a "selector" was so it was unclear what it did. Plus, `useValue` is shorter 😀 -`use$` was not compatible with React Compiler, so if you're using Compiler we strongly suggest migrating from `useValue`. +`use$` was not compatible with React Compiler, so if you're using Compiler we strongly suggest migrating from `useSelector`. `useValue` computes a value and automatically listens to any observables accessed while running, and only re-renders if the computed value changes. This can take either an observable or a function that consumes observables. diff --git a/docs/content/state/v3/sync/keel.mdx b/docs/content/state/v3/sync/keel.mdx index 6b27be1..6c25b60 100644 --- a/docs/content/state/v3/sync/keel.mdx +++ b/docs/content/state/v3/sync/keel.mdx @@ -295,7 +295,7 @@ const profiles$ = observable({ ## Sync only diffs -An optional but very useful feature is the `changesSince: 'last-sync'` option. This can massively reduce badwidth usage when you're persisting list results since it only needs to list changes since the last query. The way this works internally is basically: +An optional but very useful feature is the `changesSince: 'last-sync'` option. This can massively reduce bandwidth usage when you're persisting list results since it only needs to list changes since the last query. The way this works internally is basically: 1. Save the maximum updatedAt to the local persistence 2. In subsequent syncs or after refresh it will list by `updatedAt: lastSync + 1` to get only recent changes diff --git a/docs/content/state/v3/sync/supabase.mdx b/docs/content/state/v3/sync/supabase.mdx index fe36dea..47e44a2 100644 --- a/docs/content/state/v3/sync/supabase.mdx +++ b/docs/content/state/v3/sync/supabase.mdx @@ -181,7 +181,7 @@ const messages$ = observable(syncedSupabase({ ## Sync only diffs -An optional but very useful feature is the `changesSince: 'last-sync'` option. This can massively reduce badwidth usage when you're persisting list results since it only needs to list changes since the last query. The way this works internally is basically: +An optional but very useful feature is the `changesSince: 'last-sync'` option. This can massively reduce bandwidth usage when you're persisting list results since it only needs to list changes since the last query. The way this works internally is basically: 1. Save the maximum updatedAt to the local persistence 2. In subsequent syncs or after refresh it will list by `updated_at: lastSync + 1` to get only recent changes