Reagent Test 001

{:deps {org.clojure/clojure {:mvn/version "1.10.1"}
        ;; complient is used for autocompletion
        ;; add your libs here (and restart the runtime to pick up changes)
        compliment/compliment {:mvn/version "0.3.9"}
        reagent/reagent {:mvn/version "1.0.0"}}}
deps.edn
Extensible Data Notation
{:hello (clojure-version)}
0.0s
Clojure
(:require [reagent.core :as reagent])
0.5s
Clojure
(def turtles (reagent.core/atom []))
0.3s
Clojure
^{:nextjournal/viewer :reagent}
#(into [:div] (map (fn [s] [:span {:style {:font-size s}} "🐢"])) @turtles)
0.1s
Clojure
(dotimes [_ 10]
  (swap! turtles conj (/ (or (last @turtles) 130) 1.2)))
0.3s
Clojure
(and (swap! re-frame.db/app-db update-in [:article :nodes]
            #(reduce-kv (fn [m k v]
                          (assoc m k (dissoc v :outputs))) {} %)) :clear!)
0.3s
Clojure

Hiccup Test

^{:nextjournal/viewer :hiccup} 
[:h3 {:class "text-blue-500"} "Hello " [:code "Clojure"]]
0.1s
Clojure
Runtimes (1)