Fork me on GitHub
#reagent
<
2018-07-16
>
urbanslug18:07:50

Is it that the ratom can only be derefed in a component to give a value? I'm noticing something weird in a repl:

[0:0]~cljs.user=> (def click-count (r/atom 0))
nil
[0:0]~cljs.user=> @click-count
nil
[0:0]~cljs.user=> (def t (atom 0))
#'cljs.user/t
[0:0]~cljs.user=> @t
0

urbanslug18:07:07

with the atom you can see the result of interning and derefing the var

urbanslug18:07:19

with the ratom I get only nil

manutter5119:07:06

Ratom works like atom in my repl. Maybe you need a restart and/or lein clean?

justinlee22:07:58

yea there’s something weird with your env. that works fine for me in the repl