This looks like it takes Vue.js's approach of creating a brand new language that you have to learn (in this case MVL which is similar to HTML). It's definitely a preference for a lot of people, but I prefer React.js style, which lets you use languages you already know (HTML and JavaScript) to do literally <i>everything</i>. It may be inconvenient at times, but you don't have to reference a new language's manual every time you want to do a for-loop to figure out whether the @for attribute should go on the li or the ul.
How does this compare to Svelte, which also compiles itself away and at first glance, looks quite similar? What was your motivation for making this? (other than making something cool, ofc)
How are variables in "<p>{text}</p>" replaced? Is the security of it just an implementation detail left to the programmer who use it? Safe way would be finding the P and then doing p.textContent = data. But how do you find element by value efficiently? Or do you just to text replace?
I continue to advocate MarkoJS as "the best" HTML templating language. <a href="https://markojs.com" rel="nofollow">https://markojs.com</a><p>It is the best mix of expressiveness, ease, and clarity I've found.
I believe Angular has a similar mechanism of compiling templates to code that corresponds directly to the template much like this, and they're now backing away from it. The reason is that you end up with a lot of code per template. Some indirection, like stuffing the template parameters via a key-value map, lets you generate more generic code that is overall smaller.
Maybe it's just me but if you're submitting something to Show HN then it's helpful if your "Examples" navbar link doesn't send me to a `//TODO`!
Looks like a neat project. What is the ultimate goal of it? I gather it's to do a subset of what e.g. Vue does, with simplified API and a small footprint. Is that accurate?
Very simple concepts. So easy to try.
Saw the code. There are almost no type checks or null/undefined checks anywhere. Is this library used in any production application?
I kind of like that this feels like a vanilla JS, simple version of components. Any reasoning behind by this was created? I read the about but it was limited.