Fork me on GitHub
#reagent
<
2021-04-23
>
ribelo21:04:28

is there any way to check the previous reaction value inside reaction?

(def atm (r/atom 1))
  (def tmp (ra/reaction (if-not (neg? @tmp) (dec @atm) @tmp)))
something like this

p-himik22:04:50

No. But you can do it via an extra atom.

👌 3