3 ms·
Shameful plug: For interested ClojureScripters there's my adapter: https://github.com/jussiarpalahti/mathom https://github.com/jussiarpalahti/mathom I was look
by jarpineh 10y ago
Shameful plug: For interested ClojureScripters there's my adapter: https://github.com/jussiarpalahti/mathom https://github.com/jussiarpalahti/mathom
I was looking at upgrading it to Mithril 1.0 this past weekend, but new Cljs release's new JS support landed just then. So, now I'm trying to deduce how to get my upgraded build configuration working again...
I believe you can pretty much write Mithril with Lisp/Clojure flawor:
(nm "div"
[(nm "h1" "Mithril app with data persistence")
(nm "div" username)
(nm "div" [(text "username" username 40 #(update :username %))
(nm "button.pure-button" {:onclick #(persist)} "Persist")])
(nm "div" [(nm "textarea" {"rows" 10 "cols" 40} (get-item "data"))]))
Router and XHR/Ajax also work. I haven't yet used Mithril's components, but with 1.0 those too seem more straightforward.