by drikerf · 2y ago · 0 comments
Clojure datastructures makes this so much more enjoyable. Everything is just basic lists and maps which makes it very flexible and powerful.
[:ul [:li "task 1"] [:li "task 2"]]
It's weird that it's not more common for making web apps.
h("ul", h("li", "task 1"), h("li", "task 2"))
This is called "hyperscript-style" after an early library that used it. This is basically what JSX compiles to too. There used to be a lot of JSX vs hyperscript debates.There's also variants like h.ul(h.li("task 1"), h.li("task 2")) using Proxies now too.
Trouble is if you're used to HTML it can take a while to get used to it. It's like a learned helplessness or something.