Skip to content

Commit

Permalink
Add note about computed atom behaviour in edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
Akiyamka authored Sep 6, 2024
1 parent 7ffbfef commit 3d0d8da
Showing 1 changed file with 2 additions and 0 deletions.
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.

### Update Atom

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

0 comments on commit 3d0d8da

Please sign in to comment.