Go, roboto! Launch!! 🤖

This commit is contained in:
Victoria Drake
2020-02-02 11:03:57 -05:00
parent 0aa1ae6f78
commit de4dcd5d21
37 changed files with 12479 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
(ns hello.world.clojurescript
(:require [reagent.core :as r])
(def counter (r/atom 0))
(def text-component-style {:background-color :grey
:border "1px solid black"
:padding "5px"})
(defn counter-clicked []
(.log js/console "You clicked the counter component.")
(swap! counter inc))
(defn text-counter [text]
[:div {:on-click counter-clicked
:style text-component-style})
(str text @counter])
(defn main-component []
[:div
[:p {:style {:color :red}} "Hello world! Click the element below:"]
[text-counter "Clicked: "]])