2022-10-08

Published: Nov 01, 2022Last modified: Apr 24, 2023
Word count: 654

some interesting clojure tidbits

clojure mock mechanics

def gotta toy with this some kind of clojure physics engine?

unfortunately, it seems clerk /visibility cannot be dynamic :/

waa!

TODO simplify this example

^{#_#_ ;; wish i could do this:
  ::clerk/visibility {:result (if exporting? :hide :show)}
  ::clerk/viewer
  '(fn [last-load-time]
     (v/html [:div.text-center
              (when last-load-time
                [:div.mt-2.text-white.text-lg
                 last-load-time])
              [:button.bg-blue-500.hover:bg-blue-700.text-white.font-bold.py-2.px-4.rounded
               {:on-click (fn [e] (v/clerk-eval '(reload!)))} "Reload 🎲!"]
              [:button.bg-blue-500.hover:bg-blue-700.text-white.font-bold.py-2.px-4.rounded
               {:on-click (fn [e] (v/clerk-eval '(re-export!)))} "Re-export 🎲!"]]))}
(str @last-load-time)