Skip to content

Commit

Permalink
Add info about computed atoms 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 f5116c1
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 @@ -56,6 +56,8 @@ const cAtom = atom((ctx) => ctx.spy(aAtom) + ctx.spy(bAtom), 'cAtom')

Computed atoms should be pure functions to ensure the correct order of all computations.

> Note: If a computed atom doesn't spy any other atoms, it will update whenever any atom in the context changes.
### Read Atom

To read the value of an atom, you need to use the previously created context.
Expand Down

0 comments on commit f5116c1

Please sign in to comment.