Author here. This is an attempt to simplify frontend development:<p>1. Standards first: User interfaces should be assembled with HTML, styled with CSS, and enhanced with JavaScript.<p>2. Less abstractions: UI composition should be easy and require as few idioms and abstractions as possible, both on client and server.<p>3. Design Systems: Design should be a separate subsystem, easily accessible for developers who care about and understand design.<p>4. Scalability: Complex UIs should retain simplicity as the application grows.<p>Eager to hear your thoughts!
What's up with the code comparisons under "Complex components"? Why does the React version include so much more stuff than the Nue version? Does Nue automatically inject all those features in your app with just a "card" class on the top level element? The React version has full styling, icons, sortable columns, etc.
> This is an oldschool example using external CSS, which is no longer the "idiomatic" way to build React compomnents:<p>Where does this claim come from?<p>classNames and an external CSS file is literally the first suggested way to do styling according to the docs:<p><a href="https://react.dev/learn#adding-styles" rel="nofollow">https://react.dev/learn#adding-styles</a><p>I don't doubt that tailwind and shadcn and such are popular, but they are not even mentioned in the react docs, so I don't think you can call it the 'idiomatic' way
Hyper syntax:<p><pre><code> <tr :for="user of users">
<td>${ user.name }</td>
<td>${ user.email }</td>
<td>${ user.age }</td>
</tr>
</code></pre>
EJS syntax:<p><pre><code> <% for (user of users) { %>
<tr>
<td><%= user.name %></td>
<td><%= user.email %></td>
<td><%= user.age %></td>
</tr>
<% } %>
</code></pre>
I prefer EJS, because all you need to know is "<% begins JS" and "%> ends JS". Everything else is just plain HTML and JS.<p>The EJS website: <a href="https://ejs.co" rel="nofollow">https://ejs.co</a>
I love utopian projects like this. And I’ll say there’s lots that is appealing about the sample code, not least its terseness, a factor that is going to really matter in the next era of agentic coding.<p>Unfortunately, we don’t live in paradise - we need to consider say a ratio score, of how much complexity is required, in the platonic sense, to deliver React’s core feature promises, vs how much complexity modern react actually demands.<p>Whenever I code react I’m certain that number is at least 3:1, and I long for a simpler system.<p>But I think I am probably wrong - I think for the feature surface area react covers, it’s close-ish to the same complexity level as utopiareact(tm). React does a lot. If that’s true then a framework <i>could</i> be much simpler, but it would then necessarily be delivering fewer features.<p>Upshot: the safest path to keeping this thing simple seems to me to be extremely wise about <i>what</i> it promises to do; picking and choosing from a “full” feature stack to optimize value-for-complexity.<p>I guess as I write this is a long winded way of saying that react is at a point in the feature-complexity Pareto curve. Arguably pretty high on the feature axis. It’s worth deciding if you want to live somewhere else on the curve (big simplicity gains in exchange for features) or try and shift the curve in.
The Angular/Vue approach of sprinkling application logic in HTML attributes demos really well - wow, it's like magic! - but it can only end one of two ways: either it's too simple to keep up with real-world requirements so you end up implementing everything in JS anyway, or it tries to be everything to everyone and you end up with hideously convoluted and slow DSLs like the abomination that is ngFor.<p>Personally I think attacking the problem from the other direction and making JS more fluent at generating markup is the much more practical approach and that's why JSX won.
I'm wondering why accessibility isn't listed as one of your goals when your building a "standards first" library? It's not even mentioned as a feature.<p>I do realise your using the term standards to refer to web standards but inclusive design should be a core part of any standard so I feel it should be highlighted more somewhere!
How would you say that this solves the similar problems as React Server Components?<p>E.g. yesterday's discussion - <a href="https://news.ycombinator.com/item?id=43929054">https://news.ycombinator.com/item?id=43929054</a><p>Basically, how do you remove the gap (network implementation) between back-end and front-end, so that you don't need to think about the difference. You define the components in same place, and can add dynamic features for client-side when you need them, but the rest of the code can be even compiled to static in a seamingless way.<p>Without solving this, I wouldn't really use a new framework that doesn't challenge the similar problem.
I admire the goal of concise and expressive code.<p>Here is the basic table example presented in the post recast in <a href="https://harcstack.org" rel="nofollow">https://harcstack.org</a> functional HTML (well this is the entire website)...<p><pre><code> sub SITE is export {
site
index
main
table :thead[<Name Email Age>,],
do {[.name, .email, .age]} for @users
}
</code></pre>
Note to self - never, ever do "like-for-like" comparisons with code.<p>To be fair HARC Stack doesn't have a table component with sortable, filterable cols yet - but it is HTMX centric so should be pretty fun to spin one up.<p>And never mention that this is raku code.
I wish open-source projects checked to see if other projects share the same name.<p>Especially since there are packages in NPM already about hyper.<p><a href="https://hyper.is/" rel="nofollow">https://hyper.is/</a> has been around for a while and is kind of big
Really like what I'm seeing so far. It looks a lot like Sprae: <a href="https://github.com/dy/sprae">https://github.com/dy/sprae</a> one of my favorite things that no one seems to be paying attention to :) I use it on live-templates, which uses Sprae to connect a template to stateful backend in Elixir over Phoenix Channels: <a href="https://github.com/launchscout/live-templates">https://github.com/launchscout/live-templates</a>
So many front end frameworks that they can't even all have unique names <a href="https://hyperdom.org/" rel="nofollow">https://hyperdom.org/</a>
See <a href="https://news.ycombinator.com/item?id=43543241">https://news.ycombinator.com/item?id=43543241</a> — Announcement post for Nue
If I'm already writing against web standards, why would I want to use Hyper? I'd just be hitching my work against something that had nearly no risk, but just enough dependency risk to not be worth it.<p>At my business, we've moved from using React for client work to completely eschewing it in favor of web components. In fact, we basically don't use any major frameworks anymore. There's Express on the backend, and that's about it. I'd like to swap it out for more Go, but that's digressing.<p>I suspect that now that the front-end is a bit more stable than it has been in previous years, the remaining friction will increasingly become the remaining distraction for many developers.<p>I don't want React changing minutiae on my team for pointless or ideologically pure reasons. I just don't care. The changes bring no tangible improvements. And we also use basically no tooling.<p>Really mature software projects want as few dependencies as possible to minimize unnecessary friction. Your audience for this is a group of developers who are already pointed in this direction.
I mean I believe this framework can be more succinct in some cases, but the line count differences here seem to come down to the Hyper versions having very long lines…
There are dozens of "better React" web frameworks, so it is impossible to get any traction with that value proposition because any attempt at building a new ecosystem will be diluted. That ship has sailed. New frameworks should solve problems that are very difficult in existing frameworks. <a href="https://qwik.dev/" rel="nofollow">https://qwik.dev/</a> is a good example.
I’m really not a fan of the comparisons between the react code and the nue code - it comes off as disingenuous.<p>Just as an example that catches my eye - the complex table react example includes sorting icons, but the nue example doesn’t. If you remove features then of course there’s going to be less lines of code.<p>Feels like it’s strawmanning rather than ironmanning.
This got posted (and flagged) the other day - <a href="https://news.ycombinator.com/item?id=43902525">https://news.ycombinator.com/item?id=43902525</a> - which was somehow before the published at date on the article.