Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

[docs] feedback from PR159 #173

Merged
merged 2 commits into from
May 27, 2020
Merged
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
2 changes: 1 addition & 1 deletion docs/docs/guides/asynchronous-data-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ The following example will render the current user's name and a list of their fr
```jsx
const currentUserIDState = atom({
key: 'CurrentUserID',
default: 1,
default: null,
});

const userInfoQuery = selectorFamily({
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guides/asynchronous-state-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ If you want to handle synchronization of multiple atoms in a single place, you c

## Bi-Directional Synching

You can also sync the state so local changes are updated on the server:
You can also sync the state so local changes are updated on the server. Note that this is a simplified example, please take care to avoid feedback loops.

```jsx
function CurrentUserIDSubscription() {
Expand Down Expand Up @@ -89,7 +89,7 @@ function CurrentUserIDSubscription() {

## Synching State with Parameters

You can also use the [`atomFamily`](/docs/api-reference/utils/atomFamily) helper to sync local state based on parameters.
You can also use the [`atomFamily`](/docs/api-reference/utils/atomFamily) helper to sync local state based on parameters. Note that each call of this example hook will create a subsription, so take care to avoid redundant usage.

```jsx
const friendStatusState = atomFamily({
Expand Down