TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Noact – React-like Virtual DOM library in 70 lines of TypeScript

50 pointsby owouwuowoalmost 5 years ago

7 comments

dsukhinalmost 5 years ago
The idea of React is good - declarative, stateful, reusable components, etc. While the bloat of React and it&#x27;s toolchain (and npm plugins) has become a mess. When you have 2^100 different plugin combos to do something, you have 2^100 imperfect solutions and no experts in any of them, rather than one elegant and simple standard that can be optimized.<p>This repo is great proof that React is over engineered. Vanilla JS has WebComponents[1] and Templates, and a vDOM is easy to support (it existed long before React) and the DOM was the original place to store state in custom properties that you could manipulate internally with &#x27;this&#x27;. What&#x27;s missing is the ecosystem of Reusable WebComponents (primatives) based around this simple approach.<p>That&#x27;s why this is so great to see. As more of a purist, I would try to make this a Vanilla JS lib instead of TS and remove one more build step. But the idea of 60 lines of code that use primatives (thus making this hyper extendable) is perfect.<p>[1] <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;Web_Components" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;Web_Components</a>
评论 #23592290 未加载
评论 #23592302 未加载
评论 #23592345 未加载
评论 #23592099 未加载
slifinalmost 5 years ago
It&#x27;s weird how in the JS community rewrites of react are common in the CLJS community using React as a runtime is more common:<p><pre><code> - https:&#x2F;&#x2F;reagent-project.github.io&#x2F; - https:&#x2F;&#x2F;github.com&#x2F;day8&#x2F;re-frame - https:&#x2F;&#x2F;github.com&#x2F;tonsky&#x2F;rum </code></pre> And my favourite - <a href="https:&#x2F;&#x2F;github.com&#x2F;fulcrologic&#x2F;fulcro" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fulcrologic&#x2F;fulcro</a><p>Hosting your work on top of another ecosystem, such that you can still use the underlying ecosystem, gives you a lot of leverage out the gate
bdcravensalmost 5 years ago
Totally a tangent, but I found the explosions typing gif super distracting.
jiofihalmost 5 years ago
The wheels on the bus go round and round<p>To the author: check out Mercury (2014), Hyperapp (2017), Choo (2018)
评论 #23592950 未加载
评论 #23592144 未加载
trevealmost 5 years ago
If you&#x27;re already using typescript, why not also .tsx? It&#x27;s easy to map to your own components.
osrecalmost 5 years ago
But does this actually have &quot;reactivity&quot;? If I was to update variable, would that state propagate to all its dependants in the DOM automatically?
blackoilalmost 5 years ago
What in the JS ecosystem promotes such posts and up-votes them to first page? These 50line &#x2F; 100x faster micro frameworks &#x27;never&#x27; reach 1% in core functionality and aren&#x27;t usable beyond building 10 lines of demo app.<p>I don&#x27;t see similar posts for Java&#x2F;.Net&#x2F;Go ecosystem. Spring in 500 lines or 100x faster ASP.net!!
评论 #23592960 未加载