mirror of
https://github.com/status-im/reagent.git
synced 2025-01-15 14:24:22 +00:00
Add note about lazy cursors.
This commit is contained in:
parent
1280f58201
commit
30c9402fe9
@ -300,7 +300,9 @@ value) when the cursor is modified.
|
|||||||
Given that set-get function, (and that state is a Reagent atom, or
|
Given that set-get function, (and that state is a Reagent atom, or
|
||||||
another cursor) these cursors are equivalent:
|
another cursor) these cursors are equivalent:
|
||||||
(cursor state [:foo]) and (cursor set-get [:foo]).
|
(cursor state [:foo]) and (cursor set-get [:foo]).
|
||||||
"
|
|
||||||
|
Note that a cursor is lazy: its value will not change until it is
|
||||||
|
used. This may be noticed with add-watch."
|
||||||
([src path]
|
([src path]
|
||||||
(ratom/cursor src path)))
|
(ratom/cursor src path)))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user