You are viewing a single comment's thread from:

RE: My thoughts on Svelte - The magical disappearing UI framework

in #programming5 years ago (edited)

Nice article.
Maybe for the clojurescript counter exemple, the code can be more concise since you use javascript syntactic sugar too, no ?

(defn counter []
       (let [count (reagent/atom 0)]
         (fn []
           [:div {:style {:background "silver"
                          :padding 5}
                  [:p "Count: " @count " times"]
                  [:button {:on-click #(swap! count inc)} "+"]
                  [:button {:on-click #(swap! count dec)} "-"]
                  [:button {:on-click #(reset! count 0)} "Reset"]}])))

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 67685.37
ETH 3498.92
USDT 1.00
SBD 2.71