Gonna second @p-himik here. When doing web frontend stuff, you should always look for a solution first in CSS, then HTML, then whatever stuff is outputting your HTML and CSS. If you approach it from the other end, chances are your frontend will be buggy, slow, and lacking accessibility. Usually the idiomatic CSS or HTML solution is more simple too.
Ok, thanks. I’ll approach it with a “html/css first” mindset.1👍
is there any way to check the previous reaction value inside reaction?
something like this
(def atm (r/atom 1)) (def tmp (ra/reaction (if-not (neg? @tmp) (dec @atm) @tmp)))
No. But you can do it via an extra atom.1👌