TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Moon – 3kb JavaScript UI compiler

71 点作者 kbr将近 7 年前

13 条评论

sbjs将近 7 年前
This looks like it takes Vue.js&#x27;s approach of creating a brand new language that you have to learn (in this case MVL which is similar to HTML). It&#x27;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&#x27;t have to reference a new language&#x27;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.
评论 #17634041 未加载
评论 #17633974 未加载
评论 #17634057 未加载
评论 #17635390 未加载
skrebbel将近 7 年前
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)
评论 #17634986 未加载
dvh将近 7 年前
How are variables in &quot;&lt;p&gt;{text}&lt;&#x2F;p&gt;&quot; 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?
评论 #17634628 未加载
ramses0将近 7 年前
I continue to advocate MarkoJS as &quot;the best&quot; HTML templating language. <a href="https:&#x2F;&#x2F;markojs.com" rel="nofollow">https:&#x2F;&#x2F;markojs.com</a><p>It is the best mix of expressiveness, ease, and clarity I&#x27;ve found.
evmar将近 7 年前
I believe Angular has a similar mechanism of compiling templates to code that corresponds directly to the template much like this, and they&#x27;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.
评论 #17633993 未加载
alliecat将近 7 年前
Maybe it&#x27;s just me but if you&#x27;re submitting something to Show HN then it&#x27;s helpful if your &quot;Examples&quot; navbar link doesn&#x27;t send me to a `&#x2F;&#x2F;TODO`!
评论 #17635187 未加载
jmiserez将近 7 年前
Previous (2017, 192 comments): <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15105726" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15105726</a>
评论 #17634207 未加载
ukulele将近 7 年前
Looks like a neat project. What is the ultimate goal of it? I gather it&#x27;s to do a subset of what e.g. Vue does, with simplified API and a small footprint. Is that accurate?
评论 #17633860 未加载
评论 #17633870 未加载
vijaybritto将近 7 年前
Very simple concepts. So easy to try. Saw the code. There are almost no type checks or null&#x2F;undefined checks anywhere. Is this library used in any production application?
评论 #17634489 未加载
dandigangi将近 7 年前
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.
评论 #17634800 未加载
zubairq将近 7 年前
Congratulations on the release. I know we talked about using Moon for AppShare, and I&#x27;ll keep watching the progress. Thanks
childintime将近 7 年前
Love the design of the site (or lack of it). Apparently similar to marko.js, but no bootstrap header, etc.
评论 #17634153 未加载
hoppelhase将近 7 年前
Are you still claiming to be 14 years old?
评论 #17634276 未加载
评论 #17634727 未加载