Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about computed atom behaviour in edge case #917

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Changes from 1 commit
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: 2 additions & 0 deletions docs/src/content/docs/getting-started/learning.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ ctx.get(cAtom) // 3
It's important to note that an atom's value is retrieved only when read.
In other words, if no one has read a computed atom, its associated function won't run.

Also, If a computed atom doesn't explicitly track at least one other atom, it will update whenever any atom in the context changes.
artalar marked this conversation as resolved.
Show resolved Hide resolved

### Update Atom

To change the value of an atom, you also need a context.
Expand Down
Loading