I’m learning to use things like track
, wrap
, cursor
, and reaction
in Reagent. I’m a little confused about the following behavior:
(def aa (reagent.core/atom [2 44]))
=> #'cljs.user/aa
(def bb (reagent.core/track + (@aa 0) 3))
=> #'cljs.user/bb
@bb
=> 5
(swap! aa assoc 0 5)
=> [5 44]
@bb
=> 5
I’m wondering why bb
remains the same when the entry in aa
it should be tracking changes.