10 ms·
I used htmx with Clojure and it was easy to mimic components as functions that return hiccup. I have a default middleware that converts it to html before sendi
by wry_discontent 3y ago
I used htmx with Clojure and it was easy to mimic components as functions that return hiccup. I have a default middleware that converts it to html before sending it to the client unless I explicitly say it's a json route.
(defn some-component [{:keys [class]} & children]
[:div {:class (str "some-component-wrapper" class)}
[:h1 "Hello World"]
children])
- mindaslab 3y agoI wish I was working in Clojure. It seems to be such a good language.