Show HN: Nue – A React/Vue/Vite/Astro Alternative (nuejs.org)

370 points by tipiirai ↗ HN
Author here. I've been working on this for the past ~12 months, lately full-time.

I'm releasing two things today:

1. Nue JS: https://nuejs.org/docs/nuejs/ — A tiny (2.3kb minzipped) JavaScript library for building user interfaces. It's like React/Vue core, but there are no hooks, effects, props, or other unusual abstractions on your way. Know the basics of HTML, CSS, and JavaScript and you are good to go. Nue JS supports server-side rendering (SSR), reactive components, and "isomorphic" combinations. It takes inspiration from Vue 2.0 and Riot.js. (I'm actually the original author of Riot).

2. Nue ecosystem: https://nuejs.org/ecosystem/ — This is the ultimate goal and once all the sub-projects are finished, Nue will be a serious alternative to things like Vite, Next.js, and Astro.

The thing is that I'm not happy with the current state of web development, so I want to write a completely new ecosystem from scratch. I'm taking advantage of the "old" innovations like progressive enhancement, separation of concerns, and semantic web design. Benefits highlighted here: https://nuejs.org/why/

All projects will be released under the MIT license.

Happy to answer any questions.

311 comments

[ 3.4 ms ] story [ 366 ms ] thread
(comment deleted)
Hello Tero! Do you have project example using Nue (however small)?
Hey! You can clone and play with this: https://github.com/nuejs/create-nue — it showcases Nue JS, which is currently the only thing completed from the Nue Ecosystem. The only real Nue project atm is the nuejs.org website.
Noob here, but also a former web dev from the Web 1.0 days, looking to get back into the game.

Like you, I dislike much of the modern web frameworks and all the bloat and unnecessary complexities that come with it. I roughly tuned out of this stuff when JQuery became mainstream and everyone and everything started using it, and I couldn't be bothered to keep up any more, nor did I feel inclined to invest my time in such a bloated framework. I did come back to webdev every now and then for casual projects, but every time I did, the world moved from one fad framework to the other, which made me dislike this messy ecosystem even more.

In particular, one environment/toolset that I really disliked was Node.js. Every time I did anything with Node, it always turned into pulling down a gazillion dependencies, and eventually down the line, that led to stuff breaking because some random dependency of a dependency was no longer compatible a with newer version of node or something. It basically put me off modern webdev for good, to the extent that I web back to using plain ol' php for the backend, and since then I've been exploring using pure HTML5+CSS3 without any Javascript for the frontend, but I've been seeing limitations like not being able to do stuff like real-time form validation etc.

Which brings me to your example:

   # install dependencies   
   npm install
May I enquire why you're using npm here? Exactly what dependences are you pulling down? I thought the whole point of Nue was to avoid bloat like Node.js and dependency hell? Isn't Nue supposed to be a self-contained library/ecosystem?

Can I use Nue without touching any Node stuff at all?

I hear you! I went all-in to jQuery- scene. Even wrote a semi-famous library called "jQuery Tools" (oldies know). Then came React and I wrote Riot to simplify the syntax. Then I sidetracked to a startup world for (too) many years and watched aside how the frontend ecosystem grew to it's current dimensions.

Node uses a single dependency, htmlparser2 [1], in the package.json [2]. The HTML parser is used to traverse the HTML that is written on the Nue files. I quickly _thought_ of writing my own parser, but right now I'm having my eyes staring at Bun's native HTML parsing capabilities. Instead of Node, I'm using Bun to develop everything. I need less dependencies with it, because things like JS minification or .env file parsing are biult in.

Avoiding NPM dependencies is a high priority!

[1]: https://github.com/fb55/htmlparser2

[2]: https://github.com/nuejs/nuejs/blob/master/package.json#L12

[3]: https://github.com/oven-sh/bun/discussions/1522

Sounds like you might be interested in htmx. Lots of client dynamism, easy integration with backends and you don't need to write any JavaScript.
I've been looking at HTMX. It's good for HTML/CSS/UX developers to add dynamic pieces to a multi-page application. However, It's quite different from what Nue attempts to be. Nue is meant for building both dynamic islands and full blown web applications. It's just targeted for UX developers and the JS developers can shift their focus more to the "back of the frontend" [1]. Ultimately Nue is going to be a complete frontend ecosystem and alternative to tools like Vite and Next.

[1]: https://bradfrost.com/blog/post/front-of-the-front-end-and-b...

Yes Nue is different, I'm just saying the poster above coming from the backend world would probably find htmx useful if he still wants to avoid wading into the frontend world again. I don't mean to hijack your thread on Nue which sounds interesting, just trying to provide a helpful suggestion.
Nice project, well done!

However, it is more like an alternative to Petite-Vue or Riot.js rather than full-blown Vue or React. Therefore your comparison vs headlessui-react/vue is like apple vs orange/banana: headless UI listbox is much more complicated than your implementation. You can easily make a listbox in Vue using a similar amount of code as Nue.

One thing which is lacking in your Getting Started (https://nuejs.org/docs/nuejs/getting-started.html) is how to use Nue without a build step, in order to progressively enhance existing HTML websites like Petite Vue: `<script src="//unpkg.com/petite-vue" defer init></script>` or Alpine.js: `<script src="//unpkg.com/alpinejs" defer></script>`?

How is Nue performance compared to other JS frameworks? Could you add it to https://krausest.github.io/js-framework-benchmark/current.ht...?

Thank you!

You are right: Nue takes inspiration from Vue 2.0, petite-vue and Riot.

I'll make the comparison more fair, but it doesn't take out the fact that React/Vue promote use of "spaghetti" code where logic/layout/styling are mixed together making the code hard to read and causes the size to grow. Everywhere I look the projects are unnecessarily big. Very often in the factor of 10x too big.

Pretty sure Nue JS will always need a build step. I don't like the idea to load the compiler and run JS exec() on the client side. Heavy and unsecure.

Haven't checked performance yet. I want to see this project getting more traction before deep diving to benchmarking

I jumped straight to comparison (as it’s listed first) and was let down because the comparison seemed borderline deceiving. The other examples had hundreds of lines of logic and types for example.
Also, it was comparing a headless library with a concrete (and rigid) implementation. You could use the a similar amount of React code to get the same concrete implementation.

Probably not intentionally deceitful, but it a ridiculous comparison.

Having a zero-build-step bundle is a quick & easy way to experiment with a library and add simple interactions to existing static HTML websites, which is a big plus.

However, according to BundleJS, only nuejs-core's compile() method is 36.2KB minified gzipped: https://deno.bundlejs.com/badge?q=nuejs-core@0.1.0&treeshake... - it is nowhere close to 2.3KB as on your website. Compare it to petite-vue's bundle, which is only 7.3KB: https://deno.bundlejs.com/badge?q=petite-vue@0.4.1

petite-vue is about 3x bigger than Nue. here's the script:

https://nuejs.org/@nue/js/nue.js

local gzip on my machine is 2.3kb

Yes, but it's only the Nue runtime which is 2.3KB, the compiler bundle is 36KB. Petite Vue includes everything in 7KB.
[flagged]
(comment deleted)
Can you clarify why you believe this, rather than just posting a shallow dismissal? "Horseshit" does nothing to help me understand your point of view other than make it clear you feel something very strongly.
While their wording takes some work, it’s simply not "just HTML". Even less so than react is "just JS". It’s a DSL applied on top of HTML.
(comment deleted)
Agreed, the distinction matters and it's worth respectfully pointing out. Thanks!
(comment deleted)
Svelte is mentioned on the site but not in here. Is it harder to put Nue, or another framework, forward as an alternative to Svelte/SvelteKit? I think SvelteKit is batteries-included while still being fairly small and easy to understand.
Svelte is indeed a bit different to how the internals are implemented and what kind of compilation results are created. However it is a component-based UI framework and they also compare themselves to React a lot. When Nue ecosystem is completed, it can be compared to Nuekit.
Well, I like Svelte, and so far I don't want to write code in Nue, based on the examples. The last I looked on HN there were 67 upvotes and 34 comments. That's less than double the number of upvotes to comments. I think it's being ratioed not because people dislike the attempt at writing a web framework with a different syntax, but because the site and the text claim it's competitive with all these frameworks.
It's me replying to everything in here :)
I think "ratioed" is a pretty weak signal in general, and especially here. At least compared upvotes to commenters, not comments.
Would you mind sharing some details about how you made this? https://nuejs.org/compare/component.html

It’s very cool. I’m on my phone, but I’d like to investigate more later.

Thanks! It's a custom made script to generate a HTML page with `pre` blocks to render the source code on a file. Then a Nue-based zooming app on top of it. The images on the site are screenshots from this app.
(comment deleted)
This is done using css columns. The slider controls the font sizes, and the column width is set to 30em, which increases when the font size increases.
This looks great! Reminds me of crank.js in that it leverages native language features (generators) to greatly simplify interactive html.

Please add a mailing list to the homepage so I can keep up to date with your progress. A blog with smaller updates would be nice also.

Thank you! Good idea. I'll add blog + mailing list. I have a lot on my mind! (lol) Before that you can follow Nue on Github and notifications from there: https://github.com/nuejs
Congrats looks great. Can't wait to see the whole vision with Nuekit.

Not a fan of the Vue template syntax but it's not a deal breaker.

I really love that you don't need a bundler.

Thank you! I'm glad this initial launch got some traction so I'm absolutely going to cross the finishing line. The ecosystem code is actually done and the website is made with Nuekit. Need to polish the code, rewrite some pieces, and document everything — which is the time consuming part.
+1 on not requiring a bundler. It makes it so much easier to try out on just 1 or 2 pages when you don’t have to also add a compiler.
Exactly. And bundlers are quite big monsters. Vite, for example is 32MB on disk.
How does cross-component state work? I'm thinking something like Pinia in the Vue ecosystem. You might've mentioned it on the site but I couldn't find anything about it.
Your comparison of the various ListBox implementations[0] feels disingenuous. I know Vue best, so I looked at that implementation in detail, and it's got a lot going on that you don't attempt to replicate in your version. A few key features that are missing:

* Search—in the Headless UI version there are several hundred lines dedicated to making typing work for jumping to specific list items.

* Multiselect—Headless UI supports multiple selections, yours does not appear to. Again, this accounts for a large number of extra lines in the Vue implementation.

* Focus management—Headless UI has a lot of code dedicated to smoothing out the focus management. In my testing, your implementation has pretty buggy support for using tab to navigate.

* The Headless UI version dedicates a lot of lines to types, where your Nue implementation is dynamically typed. This may be a feature for you, but in my mind those type declarations are doing important work.

* In general, the Headless UI implementation tries to be flexible for many use cases [1], while yours only needs to support the one demo list.

These kinds of comparisons are most persuasive if you can write all the implementations from the ground up, using idiomatic patterns for each framework and identical feature sets for each implementation. When you do that, it's easy to compare and contrast the frameworks. As it is, it's like comparing a house to a garden shed: yes, you've used fewer lines of code, but it's not obvious to me that that's a feature of Nue and not just a byproduct of a less ambitious component.

[0] https://nuejs.org/compare/component.html

[1] https://headlessui.com/vue/listbox#component-api

It also seems a little disingenuous to suggest tailwindcss requires 800kb to build a webpage
Is there such suggestion? I merely counted the amount of HTML/CSS/JS tailwindcss.com has on their frontpage and put it in a comparison chart. They key take there is that inlining styles to markup and loadinng the utility CSS makes it hard to keep the initial TCP packet below 14kb, which is a limit for extremely fast loading performance.
The nuance you provide here is missing from the site. Your chart says only this (maybe I'm missing your explanation somewhere?):

> Amount of code needed for a rich, interactive web page.

And lists "Tailwind CSS" as 804k.

As a reminder, Tailwind CSS doesn't require or use JS in the browser at all and the majority of tailwind gets removed during build so the vast majority of the code you're attributing to Tailwind CSS is unrelated to the task of using Tailwind to build a rich interactive webpage.

To your point about inlining styles, using Tailwind out of the box I struggle to see how you're forced above 14kb, and if you really had kilobytes of classes in your markup you can switch to composing your own rules with @apply.

I recognize you are making a tool and not trying to do ecosystem wide benchmarks, but still suggesting you need 804kb to use Tailwind still seems disingenuous, or at least misinformed, to me.

I changed the wording to "Amount of HTML/CSS/JS on the project home page" on the front page. Thanks for the heads up.
That makes it a lot more clear, thank you!
It seems to me---and maybe my intuition is wrong---you WILL have more bandwidth usage loading

    <div class="carousel-container xyz-row xyz-row-xs--top xyz-row-xs--nowrap" data-v-72ffe0f0="">
      <div class="doorway-item xyz-col-xs-15 xyz-col-md-5" data-v-72ffe0f0="">
        <div class="doorway-carousel-media-container" ...><a class="link-wrapper link-routable cms-media doorway-carousel-media" data-v-9f4decfa="" data-v-129da109="" data-v-72ffe0f0="" ...>...</a></div>
        <a class="link-wrapper link-routable" ...>...</a>
      </div>
      <div class="doorway-item xyz-col-xs-15 xyz-col-md-5" data-v-72ffe0f0="">
        <div class="doorway-carousel-media-container" ...><a class="link-wrapper link-routable cms-media doorway-carousel-media" data-v-9f4decfa="" data-v-129da109="" data-v-72ffe0f0="" ...>...</a></div>
        <a class="link-wrapper link-routable" ...>...</a>
      </div>
      <div class="doorway-item xyz-col-xs-15 xyz-col-md-5" data-v-72ffe0f0="">
        <div class="doorway-carousel-media-container" ...><a class="link-wrapper link-routable cms-media doorway-carousel-media" data-v-9f4decfa="" data-v-129da109="" data-v-72ffe0f0="" ...>...</a></div>
        <a class="link-wrapper link-routable" ...>...</a>
      </div>
    
      ...
    
      <div class="doorway-item xyz-col-xs-15 xyz-col-md-5" data-v-72ffe0f0="">
        <div class="doorway-carousel-media-container" ...><a class="link-wrapper link-routable cms-media doorway-carousel-media" data-v-9f4decfa="" data-v-129da109="" data-v-72ffe0f0="" ...>...</a></div>
        <a class="link-wrapper link-routable" ...>...</a>
      </div>
    </div>
... vs:

    <div class="carousel">
      <div class="caro-card">
        <a href="product-url">
          <picture>...</picture>
        </a>
      </div>
      <div class="caro-card">
        <a href="product-url">
          <picture>...</picture>
        </a>
      </div>
      <div class="caro-card">
        <a href="product-url">
          <picture>...</picture>
        </a>
      </div>
    
      ...
    
      <div class="caro-card">
        <a href="product-url">
          <picture>...</picture>
        </a>
      </div>
    </div>
Sure, the CSS in the second case will be larger, but that one file gets cached for the remainder of the visit, whereas every asynchronously loaded <div> in the first case is gonna be 3.8 KB. An inventory with 3,176 items will take 12.2 MB to fully load WITHOUT product descriptions e.g. user decides to search empty string and scroll all the way to the bottom. (These numbers are rather exact because I picked a random, well-known, segment-specific shop---not cherry-picked, just the first one I thought of.)

Maybe someone at this large, segment leading company carefully considered that they should have 12 different srcset pictures because "responsive" and "bandwidth", but I doubt it because the URLs violate DRY and have escaped characters in the query part and the URL indicates this brand doesn't host static content on their own server (as in, they've hired someone el...

> whereas every asynchronously loaded <div> in the first case is gonna be 3.8 KB. An inventory with 3,176 items will take 12.2 MB to fully load WITHOUT product descriptions e.g. user decides to search empty string and scroll all the way to the bottom.

If you're asynchronously loading something, why are you loading divs, and not JSON which you then display on the page?

> fter the front page is presented, so the first thing visitor sees is a quick loading page, the 2 to 4 second load happens in the background, they click a link, BOOM next page loads in its full-featured, one-or-two-human-readable-class-per-element glory with the Sneaky Load Giant CSS as an already-cached dependency.

This has nothing to do with Tailwind, css classes, or even JS frameworks.

> outside of every paragraph (instead of a single, well-defined paragraph class that could even inherit common custom properties)

Again, this has nothing to do with Tailwind, and everything to do with:

- CSS sucks at components

- CSS sucks at scoping

- CSS sucks at nesting

- CSS sucks at namespacing

Literally nothing is stopping you from applying a global style even if you use Tailwind. Moreover, the authors of CUBE methodology [1] suggest Tailwind for utility classes [2]

[1] https://cube.fyi

[2] https://buildexcellentwebsit.es

I agree it's unfair at the moment. I'll change the example to be more apples-in-apples. I'm going to write a more detailed comparison articles for each framework. Point taken! Thanks.

Ultimately Nue will come out with a UI library with a high feature parity with Headless UI. I can imagine the current listbox (demo) doubling it's size with all the above features. Definitely not 10x!

(comment deleted)
In my opinion it’s far worse than this: it’s not just a considerably less ambitious component, it’s a component currently completely unfit for any purpose. Most significantly, it’s inaccessible due to semantic abuse and missing ARIA support (role=listbox, aria-controls, aria-expanded, aria-selected, &c. &c.). Even as a sighted user that doesn’t need to use accessibility tech (AT; screen readers are the best known example), I would hate to encounter a page using this, because it misses valuable functionality like type-ahead. Users that depend on AT will be left high and dry, presented with just a read-only text box and no idea what to do with it.

All up, it’s just like so many others, a bad reimplementation of half of what the browser already provides with <select>. About the only thing it adds to that is support for an image per option, and perhaps some more exotic styling aspects (which you hopefully don’t want anyway).

Mind you, I do find Headless UI generally bloated, mostly just suffering from being overly flexible, and it does end up with a moderate amount of code bloat attributable to the particular frameworks’ designs (though not as much as some I’ve seen), but the comparison is just unreasonable. If they think it’s fair to say “With React: 2.5k lines; with Nue: 200 lines”, then I respond: “With HTML: 0 lines”, and insist that <select> is better than the result of those 200 lines.

There are more problems with it, too, whereas I suppose Headless UI will be a pretty high-quality implementation. Examples of problems I found immediately, without having tried to actually run it, but which I presume Headless UI will be free of: it uses <menu> for the options and wraps each option’s label with <strong>, which are both semantic sins; some of the code sharing with combo boxes leads to obvious minor inefficiency (filtering, which can’t actually happen); Escape detection happens on keyup instead of keydown; clicking outside the listbox popup won’t close it if the target or an ancestor matches .open, which is very plausible, e.g. when within a modal dialog (and because it’s ad hoc, it’s certain to interact badly with things like clicking outside modals—any concept of potentially-nestable modality needs to be managed more than that, in one of a few ways but I’ve already rambled enough); after pressing Escape to close the popup, pressing Tab will reopen it as well as moving to the next focusable.

Hopefully the problems with this will be sorted out, but at present I think it’d be best to just remove the comparison, because it portrays a false picture, and suggests that the listbox is ready for use, whereas I hope that the author would agree it’s not.

Totally agree with "HTML: 0 lines" is the best pick in most, if not all situations. For example the Headless UI radio group component [1], can be implemented with just HTML and CSS — and they made it a huge JS component.

[1]: https://headlessui.com/react/radio-group

I wouldn't just call this disingenuous, I would call it lying. He's claiming that his barely usable, non aria-compliant listbox with a fraction of the functionality, is equivalent to the work of the headless-ui team.

If the reader wonders where these lines were saved, they will only find broad, general statements about (IMO questionable) values. Compare this to some other frameworks, where the changes from the status quo are clear on the landing page:

- Svelte -> compile step, templating, common features included

- Solid -> signals, constructor functions

- Lit -> web-components, fewer features

It is unfortunately common for new frontend solutions to not be as up-front about their trade-offs as I would like. But this takes the cake for most requirements swept under the rug.

> * The Headless UI version dedicates a lot of lines to types, where your Nue implementation is dynamically typed. This may be a feature for you, but in my mind those type declarations are doing important work.

Yeah this is actually a little scary:

https://nuejs.org/compare/faq.html

> No TypeScript: Nue embraces the dynamic typing in JavaScript

I for one have no desire to fight dynamic Javascript spaghetti any more. I personally think Typescript types aren't strong enough! (Too much `as Foo` around.)

Yep, nice landing page but the component comparisons are beyond disingenuous, as should be obvious to anyone who has implemented such a thing before. If you toss out the additional features, types, accessibility, customizability and composability afforded by the use of a UI library, of course you can implement it in < 200 lines -- in any framework.
Congrats on the launch! Looks really interesting. I'm looking through the documentation and am having trouble understanding the slots example:

https://nuejs.org/docs/nuejs/component-basics.html#slots

I'm unable to see the relationship between the <slot /> tag and the looped content in the 2nd code snippet. Can you clarify that in the documentation?

Edit: I think it would have made more sense if you included the @name="media-object" attribute in the first snippet.

It appears to be similar to Vue. The first snippet is the <media-object> component, and the second snippet is using the component. Everything inside the component tag goes into the slot.
I'm from a non-vue audience, so the context would be lost on someone like me.
Can you clarify? Not sure I understand what you mean.
My background is React, and I have no Vue experience at all.

I only figured it out by looking at the previous section's code before slots to see that attribute and noticed that the slots example first snippet was missing the attribute I mentioned that would connect the pieces together

Thank you! The slot syntax is borrowed from Vue. The difference is that there can be only one slot, and not multiple named slots.

I can see that the slots example needs improvement and more detail. I'll make it shine because slot is such an important feature and helps you build reusable code.

I'll work on the docs as a whole, now that I'm getting this valuable feedback from here.

Every slot system I've ever seen eventually implemented multiple named slots. Often after first only supporting one slot, then multiple unnamed slot and then finally the whole shebang.

Why go through that whole progress again with Nue? Or do you foresee some other way of doing highly customizable components?

How does it compare to Svelte?
The syntax is HTML- based, strong preference to separate styling/logic from the UI code, and keep it familiar with UX developers [1] (not JS developers), there is no need for Bundlers like Webpack or Vite, and it's written in more minimalistic fashion. Your app is probably smaller too if it's anything more complex than a TODO- app, because Nue is only 2.3gzipped and the compiled files are very small too.

[1]: https://css-tricks.com/the-great-divide/

This is fantastic. As much as the web changes and people complain about "new frameworks" everyday, all the major frameworks are surprisingly similar.

Rethinking things from the ground up and making it smaller and more RAM efficient, is absolutely brilliant.

More frontend devs needs to stop following the herd and think for themselves and look back at how hackers used to work back in the day to use as little memory as possible.

These days I look at apps like Slack and feel such terrible sadness and despair.

Projects like Nue at least have the right spirit and attitude.

This. So glad to see there are still people who care about minimalism! I asked here on HN the other day that "why your login screen loads 6.4MB of resources" and they said that VSCode is ~200MB and gdocs is ~30MB so it's not that bad. That's the spirit these days.

I want to make things very, very differently. Not just because of the size, but maintaining a codebase with 5k lines is so much easier than maintaining 500k lines.

The problem is more in the ecosystem side than the core libraries side. Many front end devs build UIs for a day job and when they’re developing some new product requirement they don’t think twice before pulling in react-widget, react-ui-this, react-router, react-accordian. This is the main issue that creates bundle bloat and maintenance pain down the line.

I don’t know what the solution is there.

Better education or being more informed would help. Knowing the basics well, like HTML and CSS, to already avoid some of the JS. Then knowing a backend language can help with actually considering simply rendering templates on the server using some template engine, like done for decades. Some knowledge about setting up a HTTP server would probably also help. Knowledge would help being able to take a step back when needed and think: "Do I actually need much interactivity here?"

Question is how we get web developers to learn those, instead of the next (ha) hyped JS frontend frameword.

We're competing with $15/hr labor. Businesses are happy to hire developers who deliver 6.4MB login pages quickly, until their customers start to complain.

I'm all about caring and using resources efficiently, and in a sense that's how we get such inefficient tech even though it's not what I mean. Money defines efficiency, and we're getting heavy apps for pretty cheap while lighter apps are more expensive in terms of specialized labor costs.

If engineers with this right attitude collectively work for rates competitive with global head shops and still deliver as quickly then we can have our light weight app cake and eat it too. I'm personally selling my services for $15/hr already, and anyone who hires me will get a pretty well engineered solution with minimal dependencies; who's with me?

Since most frontend jobs these days seem to be about having to use one of the big frameworks, I have withdrawn from frontend work mostly. I do have quite OK JS knowledge and have done things in TypeScript when I needed to. I even did explore React (and NextJS, and VueJS) stuff a bit, but it left me disappointed. I have the skills, but no motivation at all to spend time with that kind of frontend work. Until this changes, I will most likely not engage in any frontend work or "full-stack" development.
(comment deleted)
Do you plan to support this for 5 years or more? Because that's the kind of LTS I need to take this seriously.
Read the source, it's a few hundred lines of code. It's very much possible to treat is as your own app code and "maintain" it.

Kudos to the author, the best thing about this is that the source is concise!!

I disagree that vendoring / forking a 3rd party library is a good idea.
You do not understand how software is written. We do not support third party tools. We expect third party tools to be supported. Otherwise they are of no interest. We have other priority items to focus on.
I plan to develop this as long as there are people using it. If the world changes and a new jQuery comes around, then I have to see how to adapt. But the goal is to stabilize the code and make it production ready. Same for all project on the Ecosystem. By looking at todays traction, I'm highly motivated to continue with this project. I'm working full-time actually because I don't have a day job atm. I like it.
New day, new JavaScript framework...what's new? Anyway, I highly recommend Quasar if anyone's looking for something new to use. Been using it for two years now and after 20 years of coding I felt happy using JS. Not that Vue is not good but quasar just has it all and is built on top of Vue.
Thanks for the pointer. Quasar seems more like an UI library. Like Material UI or Chakra. Not directly comparable with Nue JS. It's comparable with the upcoming Nue UI though: https://nuejs.org/ecosystem/
Looks neat! Will keep an eye on it.
I wonder what the rise in AI assistants like Github Copilot will mean for new projects like this?

Will people avoid adopting them because code won't be auto-generated efficiently?

It wouldn't be a barrier for me or many people that read hacker news, but I suspect there is a growing subset of the developer community for who this would be an issue.

Depends on whether Nue becomes relevant. New projects are obviously unknown to AI, but they learn as the world starts adopting them.
That's what I'm a bit afraid of. Will software engineering get "stuck" with just the tools we have right now, because LLMs won't be able to help with anything newer?

If you're thinking, all we have to do is wait for OpenAI to re-scrape the web and re-train GPT on the new material, well... LLMs don't "learn" so much by looking at documentation, as by looking at examples. And a new tool is not going to have a lot of examples out there, simply by virtue of being new.

Also, people are already misusing LLMs to generate blog spam, which regurgitates existing knowledge. Future LLMs will have to train on that as well.

The "Selfish Gene" strikes again.

LLMs don't just regurgitate examples, but the have some internal model of the world and can learn new things. See this example: https://szopa.medium.com/teaching-chatgpt-to-speak-my-sons-i.... A sophisticated enough LLM should be able to read a documentation and learn a language faster than a human programmer, but we're nowhere near that stage yet.

Aside, this is not going to stop people learning and using a language if it provides benefits. Not everyone is on the AI hype train. I personally couldn't care less - I don't trust any current AIs to write correct, bug-free code and so I just avoid them. Then again, I also don't trust most humans to write bug-free code and I tend to avoid them too. Formal verification should be the way forward, and this is why new languages, which can embed proofs, should continue being developed and improved, ignoring the AI hype.

When the AI can write code in formal verification languages, I might consider it.

You are assuming the level of LLMs is static. An alternative future is one where LLMs get so good that they can generalize over new patterns and learn Nue themselves to then help you code in it.
When it becomes easier to have an LLM read website content on the fly, this will hopefully become less of an issue.
I can't believe I have to say this, but there are still developers who don't use AI assistants to program. They write code "manually" by reading documentation and reference material, as our ancestors (mostly) did. They might be a dying breed, but they're out there.

Personally, I'm waiting for the space to settle, and for an offline, self-hosted and OSS version to reach feature parity with the proprietary SaaS offerings. Those might exist already, I'm not evaluating the options frequently, but I'm in no hurry.

On-topic: NueJS looks interesting. I'm very worn out and weary of shiny new JS frameworks, but I like the simplicity here. Will keep an eye on the project and consider it again once it matures, but for now Svelte is my best friend.

I haven’t even considered using AI to “help” me code! Is this really that widespread in dev land? Surely not.
For a long time, you've had dropdowns while typing that list possible matches.

If you introduce a feature where someone writes

    int i=0;
and the IDE goes, "Hey dude, probably writing a loop, should I manage that for you?" and it's C++ 17/20/23 or Rust or Go best practice and looks back a little bit in your code and in its compendium of great project examples to see what the loop logic should/could be...

I would probably let the IDE write the loop header for me. And the string formatting. And modify the function I'm writing to support multithreading. And tell me it looks like I was trying to change each instance of pxX to pxY and graphX to graphY but also forgot to change one rotX to rotY.

Hell, if the IDE could read a PDF datasheet and automatically import addresses and bitfields and assign them to variable names, much of my current career workflow would be automated and I could focus mental effort on more creative work.

No thanks to all of that. Following that train of thought, most programming could be considered a chore. And to me, it's not. I like my tools to get out of my way, and not guess what I'm _trying_ to do, but let me do what I _want_ to do.

Autocomplete is far less intrusive, and doesn't fall into this category. I can quickly refine the results since the scope is greatly reduced, and I don't have to read a large chunk of code to understand whether it does what I want it to do, or whether it introduces subtle bugs I'll have to hunt down later. Besides, we've had code snippets, macros and refactoring tools for decades to help with writing code quickly, so AI tools are not groundbreaking in that sense.

Even once AI tools are absolutely correct in guessing my intention, and write entirely bug-free code, I think I'll still prefer typing code out manually. By that point, AI will be capable of writing complex programs from prose prompts, so that creative work you mention will also be automated away. Yet human programmers will still exist in some form, if nothing for the joy of it. We'll probably value programs written by humans in the same way we value handcrafted tools that are not mass produced today.

There are also developers who are better programmers than AI itself, so for them writing code straight away is much easier than thinking about the natural language prompt needed to generate the same code from a non-deterministic statistic machinery.
(comment deleted)
Here is what some of it looks like.

``` <div @name="media-object" class="{ type }"> <img src="{ img }"> <aside> <h3>{ title }</h3> <p :if="desc">{ desc }</h3> <slot/> </aside> </div>

<div class="art-gallery"> <media-object :for="item in items" :bind="item"/> </div ```

I really don't like the opinionated, magical/weird syntax (like vue's :@v-for-OnClick="fn()"), I prefer how close and true to vanilla html/js react is, rather than stuff like this.

Yes. Nue is indeed HTML-based and takes inspiration from Vue. It is designed for UX developers who prefer to use HTML/CSS and minimal JavaScript to communicate with the business model layer, that the JS developers are building. That is: separation of concerns.

I can understand that this syntax is not a preference for JavaScript/TypeScript developers who opt to JSX and want to write everything (logic, layout, styling) in JavaScript.

    <p :if="desc">{ desc }</h3>
That </h3> should be a </p>, I think.
My problem with these :ifs and v-ifs and {#ifs} is I cant place a breakpoint and step through _my_ code with a debugger.
React is far from vanilla HTML. It uses JSX with attributes e.g. `className` or `htmlFor` instead of HTML's `class` or `for`. And JSX requires compiling to HTML rather than being HTML from the beginning.
It's almost identical to vanilla DOM, though, which does use className and htmlFor.

I'm not sure that the compilation aspect is relevant - pretty much all modern frameworks using a template language have a compilation step. ngFor doesn't exist in the browser after all! ;)

You're confusing the XHTML/HTML and JavaScript API naming schemes
I'd say it's JSX doing that because those attributes are clearly on the declarative/markup side of the divide, not the procedural/imperative dom manipulation side.
To push that point further, I’d say JSX is opinionated, adding magical/weird templatey syntax to Javascript.
(comment deleted)
React has a lot of opinionated, "magical" boilerplate. useThis, useThat, ... In my experience, Svelte did a much better job and is closer to vanilla html/js, but for some reason it seems to fail to gain significant traction.
I agree -- I don't love Svelte but it feels much closer to just writing plain HTML+JS+CSS than any other fancy JS framework I've tried.

The goals of this project and Svelte seem very similar, so I'd be interested to see a more in-depth comparison.

Hooks are just normal javascript functions though, they're not syntax.
No special syntax but they do have special semantics, as per the "rules of hooks".
"use" is just a convention for hook function names, react doesn't require or enforce it.
It's "just" a convention, but a strongly encouraged one. The React docs say:

Its name should always start with `use` so that you can tell at a glance that the rules of Hooks apply to it.

And it is required and enforced if you use the ESLint react-hooks plugin (which I'm guessing most large projects do).

> In my experience, Svelte did a much better job and is closer to vanilla html/js

I just looked at some Svelte examples and it's a mix of magic keywords (on, bind) with magic symbols (: | @) and new, completely unrelated syntax to both JS and HTML (#each, #if, :else). I guess it looks way more idiomatic if you have an IDE that highlights and lints it correctly. React with its few rules of hooks seems way closer to vanilla JS.

>Nue CSS

>Bring back the power of cascaded styling

Welp, I'm out.

Yes. Nue is probably not a good pick for people who really like things like React and Tailwind. It's more like going backwards in time when standard HTML, CSS, and vanilla JavaScript was a thing.
Tailwind is maybe good for people that do not want to learn CSS but creates bloat for user to download.
How exactly do you use Tailwind without knowing how to use regular CSS first? Pretty much everyone I known uses Tailwind BECAUSE dealing with CSS is a fucking nightmare, even in component-based frameworks.
I know CSS and have to look always into the Tailwind documentation to find the corresponding settings. As long as you use tailwind 0815 settings everything is ok, but not easier as css (if you know css).
You do know that unused styles get removed and Tailwind gets converted to plain CSS?
(comment deleted)
The problem in the past with css was the inconsistent browser implementation, this should be solved since some years.

And now we have native nesting, wich was in old times a reason for use things like sass/scss/... CSS-Variables too, so theming is not a pain in the a.. anymore.

You can use overbloated frameworks, but i did not see a reason anymore for that. Especially when you develop component based. Tailwind on a top level is ok, but not within a component and child items, unnecessary complicated.

Nue does not try to be a new starndard. It tries to bring web developers closer to web standards: HTML, CSS, DOM, and plain JavaScript. New developers today start with React, learn hooks, adopt Tailwind, and writes TypeScript and distance themselves from the basics.
> distance themselves from the basics

It’s almost as if there’s a reason for this.

Classic HTML is pretty good for building static websites, but it sucks for building interactive applications.

I get why you want to replace vue/react/next/nuxt, but why vite?

Are you really planning to create a new build tool?

Not a build tool, but rather a web application builder with support for multi-page applications (aka. websites) and single-page applications. Vite is (mostly) a SPA application builder so that's why it is mentioned.
Vite can be used for MPA for eg: Astro uses it.

While you may not need it, everyone else may have different needs

Exactly. Nue is an _alternative_
ListBox/PopupButton … The React version is 2500 lines of JavaScript

Is this idiomatic? I refused to use React for years, but if this is normal-ish, it basically cements the decision. An implementation of a ListBox in VGA 0xA0000 framebuffer could be only a little bigger (if even bigger). GtkTreeView, which draws a complete tree/table with columns, resizing, dynamic rows and all the interactions, was 10kloc, afair (now 14). GtkCombobox.c is 5kloc, almost half of that is comments or doxygen.

The listbox does a lot like searching, multiselect, is completely accessible and includes a lot of types. It's a really unfair comparison.
Do you mean my comparison to gtk, or on-site comparison to nue?
Even with all those features, 2500 lines sounds like way too much.
He's also included pieces of Headless UI's embedded framework, which they use to minimize the differences between the different implementations. It's definitely not representative of regular code in the frameworks being compared to.
would be great to use bun with this!
Bun is really awesome! I'm using it to develop Nue. It runs the minimalistic code in instant. Everything is sooo fast and pleasant. Test suites finish as soon as I release the Enter key.