reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
neural 2020-06-27T22:49:36.274800Z

Hello! simple question, i only want the first value of a raton in a button, like this:

neural 2020-06-27T22:49:39.275Z

(defn greet [num] [:div (str "hello " num)]) (defn btn [counter] (let [i @counter] [:div {:on-click #(swap! counter inc)} (str "value-" i)])) (defn doit [] (let [c (r/atom 0)] (fn [] [:div [greet @c] [btn c]])))

neural 2020-06-27T22:50:05.275500Z

how i get the very first value of my ratom??