reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
simongray 2021-04-23T07:23:49.175200Z

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.

Richie 2021-04-23T14:15:57.175400Z

Ok, thanks. I’ll approach it with a “html/css first” mindset.

1👍
2021-04-23T21:04:28.176200Z

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-himik 2021-04-23T22:31:50.176300Z

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

1👌