Skip to content

Commit

Permalink
docs: computed empty deps
Browse files Browse the repository at this point in the history
* Add note about computed atom behaviour in edge case

* docs: computed lazines

---------

Co-authored-by: Arutiunian Artem <[email protected]>
  • Loading branch information
Akiyamka and artalar authored Sep 9, 2024
1 parent 7ffbfef commit 05f1388
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 (by `spy`), it will recall on each read (`get` / `spy`).

### Update Atom

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

0 comments on commit 05f1388

Please sign in to comment.