Hello! simple question, i only want the first value of a raton in a button, like this:
(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]])))
how i get the very first value of my ratom??