Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/content/state/v3/react/react-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ title: React API

### useValue

<Callout title="Migration from 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 😀
<Callout title="Migration from useSelector">
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 😀
</Callout>

<Callout type="warn" title="Migration from use$">
`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`.
</Callout>

`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.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/state/v3/sync/keel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/content/state/v3/sync/supabase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down