I like using hiccup from Clojure. Does anyone Javascript library to recommend that “feels a bit like hiccup”?
this one is the closest I know - https://mithril.js.org/
var root = document.body
m.render(root, [
m("main", [
m("h1", {class: "title"}, "My first app"),
m("button", "A button"),
])
])
that looks nice! Thank you 😁
beware that this one is ancient old by JS standards 🙂
Gotcha 😄
why from JS if I may ask?
At $WORKPLACE, we have a certain long-living javascript codebases where the team maintaining the codebase is most comfortable with javascript. I don’t think me shouting “you guys should be programming in a different language” from the sideline would be too helpful …
and those people can't find a hiccup-like library, or do you also work on this project?
perhaps lit-html would also be nice to use: https://lit.dev/docs/v1/lit-html/introduction/
those people are currently discussing that the code currently uses handlebars for html templating. My gut reaction is that the code is a bit “too magical” right now, interpolation happens at different places. I have a hypothesis that avoiding string templating and moving to explicit function calls (supporting goto definition and find references) would be helpful.
yeah I think lit-html would fall into that category where goto definition etc would work