Help Garden

Powered by 🌱Roam Garden

(defn all-children [ent]
    (:block/children ent)
  )

(defn controlled-input [my-local-string]
   [:div 
              "My local string is controlled by the input" 
              [:li  @my-local-string]
              
             [:input {:value @my-local-string
                      :on-change 
                      (fn [event] 
                        (reset! my-local-string 
                             (.. event -target -value)))}]
             
             ]
  )

(declare color)

(defn counter [my-local-number]
               [:div "I have been clicked"
             [:button {:on-click 
                       (fn [e] (swap! my-local-number inc))}
               @my-local-number]
              " times"]
  )

December 1st, 2020