Skip to content(if available)orjump to list(if available)

Show HN: Nue – Apps lighter than a React button

fcpk

I see a lot of people angry at "Nue" in various ways, and I can't help but think these are people heavily relying on React and missing the overall issue. The issue is that these huge frameworks have made the web a horrible slow mess. I deal as DevOps/SRE daily with these services, and finding one that will do a first load under 10s is close to impossible. When a simple home page dashboard or a notes page takes more than 10s to load on a 10G connection peered within 5ms of the host, and 95% of this is spent in JS, that's when you know the typical current webapp has reached a massive state of bloat only supported by fast browser engine, and people not having expectations.

I'm not hopefully Nue would revolutionize this since there are plethora of Web SaaS companies just wanting to use "common" frameworks... but I can at least root for them.

oefrha

The bloat isn't coming from "huge frameworks" like React.

To give some concrete numbers: a barebones react project created with `pnpm create vite -t react-ts` clocks in at ~60KB compressed:

  dist/index.html                   0.46 kB │ gzip:  0.30 kB
  dist/assets/react-CHdo91hT.svg    4.13 kB │ gzip:  2.14 kB
  dist/assets/index-D8b4DHJx.css    1.39 kB │ gzip:  0.71 kB
  dist/assets/index-9_sxcfan.js   188.05 kB │ gzip: 59.16 kB
A vue project (`pnpm create vite -t vue-ts`) is even smaller at ~25KB:

  dist/index.html                  0.46 kB │ gzip:  0.30 kB
  dist/assets/index-1byZ3dr3.css   1.27 kB │ gzip:  0.65 kB
  dist/assets/index-CKXNvRRZ.js   60.77 kB │ gzip: 24.44 kB
I've created plenty of medium-sized projects with React/Vue clocking in at 200-300KB compressed (excluding image assets). You can still realistically use those on 2G — yes I've tried, not just in dev tools, but when I was actually rate limited to 2G.

> When a simple home page dashboard or a notes page takes more than 10s to load on a 10G connection peered within 5ms of the host, and 95% of this is spent in JS.

You can create that kind of garbage with any framework, or without framework. You can actually do worse with the traditional way of using third party dependencies wholesale (the jQuery way), you can be downloading 200KB for 1KB of actually used code.

Edit: Also, the comparison in the article is pretty stupid. A full view in React is not much larger than "a React button", it's upfront cost + marginal cost.

tipiirai

Author here: Fair point—React’s baseline isn’t a monster. ~60KB compressed for a barebones Vite/React setup, or even ~25KB with Vue. Medium projects at 200-300KB are definitely workable.

But here’s the point: a single React/ShadCN button, straight from their official docs, still outweighs Nue’s entire SPA demo. Add more widgets—tabs, modals, whatever—and that gap only widens. Nue is flipping the script. Web standards let us start lean and stay lean—smaller codebases, faster HMR, quicker builds. That’s the win: efficiency that scales without piling complexity.

schwartzworld

> a single React/ShadCN button

So don't use ShadCN? It's so weird to put up this strawman app and then be like "see what's wrong with React"? Like showing two boards nailed together and being like "can you believe I needed all those power tools just to do this?"

> Add more widgets—tabs, modals, whatever—and that gap only widens

This is the benchmark I want to see. Two full-featured apps built with minimal prod dependencies. There's a pretty good chance that the various ShadCN modules share many of their dependencies so that importing more doesn't necessarily mean a linear increase in bundle size. It could be that once you build something full-featured, React projects come in smaller, or at least not big enough to invalidate the other upsides of choosing it.

oefrha

An extra 100-200KB compressed is a ~100ms one time cost once in a while for the majority of my users, and ~1s for 95%+ of users. At that point I'm going to optimize for developer productivity (which includes breadth of ecosystem). I can be both productive and respectful to my users with these common frameworks.

Note that I'm very mindful of web performance, and I've been quite vocal on this site about some alarming trends like calling for the end of bundling (native esm) and roundtrips for everything (liveview and co., or at least the abuse of them). In my experience waterfalls and roundtrips are the number one thing hated by people on slow and/or unreliable networks; 100KB added to a flat bundle at load is almost nothing.

PaulHoule

How much is it React/Nue and how much is everything else?

HTML has evolved in the last 15 years to be a platform for applications. The early Bootstrap was a terrible Rube Goldberg machine because CSS didn't have civilized layout mechanisms such as grid and flexbox. Newer frameworks like Tailwind are more sensible, but still add 50k to your bundle, and if your app is complex and developed under deadlines you probably have components that use Tailwind and Bootstrap and emotion and styled-components and raw CSS and you still have to write some SCSS to get the styles just right in the end.

I've been investigating the accessibility of various <Modal> components and found that they all suck because they do complicated things with <Portal>(s) and various-aria-attributes. HTML has had a <dialog> component that properly hides the rest of the page since 2022 but barely anyone was using it.

If you stuck to using Tailwind or Bootstrap or raw CSS and used a minimal widget set you can make small applications with any framework. If you wrote raw CSS and made the most of the widgets that come in HTML5 (like the new stylable <select>) you can make tiny applications.

a022311

I think Nue just puts you in the mindset of trying to keep the codebase as small and lightweight as possible. I wanted to rebuild my website with Nue and there was something telling me to avoid Motion, Tailwind CSS, etc. This philosophy can actually prove very helpful in the long term, however I feel that by using Nue you're really compromising on DX (development is much slower), although that might be because I'm not so familiar with creating websites without a framework. In any case, it's definitely worth a try.

eastbound

> React’s baseline isn’t a monster.

Yes it is. It’s not size, it’s logic: Every time the component rerenders, the root loop is executed. Why? The root loop reassigns every useEffect, reruns every useState, every other hook (and useSearchParams is executed n times for n components that need it in the hierarchy) when only the HTML needs rerender.

(Yes the programmer can optimize/memoize, and yes “a hook’s execution time is very short” (but multiplied by every cell in the table, when needed)). Must be the fault of the programmer if the framework has a super-intensive concept at the root.)

ouraf

this means the example wasn't made to be lightweight. You'll need an apples to apples example to convince any detractor. Implement the same app using two different toolsets, document the process with each and then benchmark it

nicce

To be honest, I am very confused with this benchmark. It is misleading.

What is the actually size of the production build portion only for that button part? Because I think that the ShadCN button source code is not equal in size for the button that client downloads in production environment. Especially if you have SSR.

jeffhuys

[flagged]

jsight

> The bloat isn't coming from "huge frameworks" like React.

I agree. This is such a familiar cycle. People still blame Java for things that were really the fault of the average "enterprise Java developer".

The reality is that these frameworks don't automatically lead to bloated code shipping everything.

aubergene

Just to add Svelte (`pnpm create vite -t svelte-ts`) ~8KB

  dist/index.html                  0.46 kB │ gzip: 0.30 kB
  dist/assets/index-yJpzg09Q.css   1.26 kB │ gzip: 0.63 kB
  dist/assets/index-CxtJFQC8.js   17.91 kB │ gzip: 7.72 kB

actinium226

> You can create that kind of garbage with any framework, or without framework

I would think it would be quite a challenge to accomplish the given task without a framework?

floydnoel

before React took over, "SPAs" were written with jQuery and Bootstrap, and it was common to see a project with multiple copies of different versions of jQuery. Totally possible to bloat a website without a framework. just go old school!

ToucanLoucan

Downloading =/= executing. Downloading 60 kb of compressed JavaScript isn't the problem, the problem is running that JavaScript, and all the resulting web calls that JavaScript will do, and all the resulting compute it will take to... I dunno, make the button round or whatever. Load time is no longer a solid metric for a good experience, that's very late 00's of anyone to say, the metric now is how long until the page is laid out, and the controls on it are responsive?

Edit: Also how hot is my phone?

trgn

absolutely. page performance is the result of a hairball of initial asset loads, AJAX calls, ad-hoc roundtrips, telemetry bloat, ...

It's so convoluted, and very app specific. Core web vitals provide the right framework to think about what is relevant, but in reality your app likely requires dedicated instrumentation to capture these phases accurately.

oefrha

I test my damn sites on a fucking iPhone 6 from 2014. Executing that JS is a breeze.

React etc. runs just fine on absolute garbage kiosks. If you introduce 10MB of additional JS on top of 60KB of React, it's those 10MB's fault.

knubie

Downloading 60kb of compressed javascript takes way longer than executing it.

balamatom

>You can create that kind of garbage with any framework, or without framework.

The whole point of the framework is to make even absolute garbage stick together. (While making the developer replaceable.)

ikurei

I'm not happy about how bloated most React sites are, and I've mostly stopped using it unless clients specifically request it after years of it being my main framework, but...

> The issue is that these huge frameworks have made the web a horrible slow mess.

I don't think this is accurate. Most bloat in the web is caused by:

a) developers don't taking any time to optimize, lazy load, cache, minimize dependencies...

(This is partly on React, or may be on the culture around React that has made all of this normal and acceptable.)

b) the 300 tracking scripts every site has to try to squeeze as much revenue as possible

(I remember being shocked, some years ago, when I saw a site with 50 trackers. May be it was The Verge? Or some newspaper? Now I don't even bat an eye when the number is in the hundreds.)

React sites can be extremely fast if the developer cares, and the bloat it introduces is rarely relevant. The OP article describes a button as 78K, but that's because it's loading the whole of react for just a button.

If your page has hundreds of buttons, you don't bring 78K hundreds of times, and so complex sites built with React are not that inefficient.

As a Devops engineer, do you have stats on how much of that slowness is the framework or the actual app code?

mpweiher

> a) developers don't taking any time to optimize, lazy load, cache, minimize dependencies...

> (This is partly on React, or may be on the culture around React that has made all of this normal and acceptable.)

Yes, that, too. But you are forgetting that React makes all that opimizing work necessary in the first place.

Networks are fast. Machines are crazy fast. Almost 30 years ago I was doing on-line adaptation of Postscript print files. So some form input and re-rendering the Postscript with the updates from the form values. Basically instantaneous.

branko_d

> Networks are fast.

Well, it depends on what you mean by “fast”: bandwidth or latency? While the bandwidth has improved enormously over the years, latency… not so much. And it never will due to the simple fact that the speed of light is limited.

Most of the slowness seems to come about by treating latency as something that doesn’t matter (because the testing is done on a local, low-latency network) or will improve radically over time because bandwidth did (which it will not).

Unfortunately, React wants to be both a rendering library and also manage state by tying it to the component lifetime, which encourages cascaded fetching - exactly the kind of workload that is sensitive to latency.

nicce

> Yes, that, too. But you are forgetting that React makes all that opimizing work necessary in the first place.

Isn't the runtime state optimization the only responsibility of React. It's a library. The rest goes for Vite, Deno et al.

tmpz22

Low powered android devices are a thing. Networks outside of Metro US, EU, and parts of Asia, are also a thing.

Check out google maps there’s more to the world than your open office.

regularfry

> a) developers don't taking any time to optimize, lazy load, cache, minimize dependencies... > ... > b) the 300 tracking scripts every site has to try to squeeze as much revenue as possible

Having seen the dynamics up close, I'd say it's far closer to the truth to say that the reason developers don't have time for a) is because they are having to spend all their time on things like b). I've not met a developer who doesn't want to build a better experience. I have met many developers who can't do so, for reasons outside their control.

Characterising it as "if the developer cares" puts the blame in entirely the wrong place.

soulofmischief

It's both. The majority of web developers today suck, plain and simple. They thought they could make a lot of money doing web dev and don't approach engineering as an art form or a science. They just scrape by and do not level up on their own outside of or during work.

I've had to come in and rewrite apps before where the developers had full leeway and still produced an unmaintainable behemoth of third-party components loosely taped together.

Also, React is a nightmare. An absolute minefield with zero cohesive vision, with an ever-changing API and a culture of shaming developers who haven't switched to the new React paradigm-of-the-year. For a framework meant for serious adults, I'd check out mithril. It's small, API-stable and intuitive, and gets right out of your way.

cbm-vic-20

I've seen this happen many times:

Dev: Hey, I added that screen you asked for- take a look and tell me what you think- any layout changes, wording, etc.

PM: Looks great! Okay, the next thing is...

Dev: Hold on! I need to go back and clean up some of the code I put in there to test a few ideas, and there's a loop in there that has some side effects if some if the timing is off.

PM: This looks fine. Let's move on to the next thing..

ikurei

That's a good point. I didn't mean to demean React developers: I've been one for years and I can't say I optimized everything I could've.

The blame for not caring enough about performance and UX is on the whole industry. That does include developers, but not just them.

friendzis

How can you close the ticket without "taking any time to optimize, lazy load, cache, minimize dependencies..." if that is in the AC/DoD?

Why don't those developers that care put important things the AC/DoD?

maccard

I’ve worked with plenty of developers who will argue that it’s fine on their development environment and their machine on the same network with test data and that it must be $OTHER_TEAM who is causing it. Arguably more of them than ones who really care. The problem is it only takes 2-3 of those people to bring the whole thing crashing down.

brundolf

I would go farther and say it's not even a lack of "optimization", it's a bloat of spaghetti logic that no sane person would ever write, driven by teams that don't talk to each other and are constantly pushed by stakeholders to add more layers instead of cleaning anything up

It has nothing to do with the frameworks. Except maybe that they empowered developers, including the ones cranking out bad code

cowsandmilk

> developers don't taking any time to optimize, lazy load, cache, minimize dependencies...

I built much more performant apps without lazy loading or caching when using html and a sprinkle of JS.

jack_riminton

Exactly. If it's a common enough occurrence that most React SPA's are slow and bloated, it may not be the framework's fault, but if changing to a simpler framework makes it better, then it's just a semantic argument

branko_d

We built a document management system as React SPA which is very performant.

Key: when user clicks on something, this causes 0 to 1 HTTP requests.

We didn’t do lazy loading or caching either.

ben_w

> the 300 tracking scripts every site has to try to squeeze as much revenue as possible

Just the other day I was appalled by a new record, 1604.

I'm increasingly of the opinion this stuff needs to just be banned outright by law. None of the businesses I've talked to seem to be aware of how dishonest it looks to say "we value your privacy" while trying to get users to agree to get more companies than there were pupils in my secondary school to analyse them.

pavlov

EU has laws that give back control to users.

But for this to be effective, the browser should be cooperating and working on the user’s behalf to limit tracking. (You know, the whole reason why WWW calls it “user agent” — it should be on the user’s side.)

Unfortunately >90% of browsers use an engine made by the greatest beneficiary of user tracking. Hundreds of billions in future profits might be endangered by giving users actual control. The proverbial fox guarding the hen house.

spockz

Where do these 1600 trackers even come from? Does every text writer add their own in the CMS? Is it not managed centrally? Or does every web component load their own flavour?

I didn’t even know there were 1600 different distinct trackers around.

ksec

>the 300 tracking scripts every site has to try to squeeze as much revenue as possible

Let's say tracking for revenue is required and not an argument to be made. The question I never quite understand is why cant we have ONE scripts to rule them all? I remember there was a company / services that may be called Segment? And quick google search doesn't have anything familiar, that offers something like that.

whstl

The reason we still have 300 scripts is that ad-tech companies want direct control over their tracking rather than relying on an intermediary.

So they make it harder or more limited to integrate with tools like Segment.

ivan_gammel

> why cant we have ONE scripts to rule them all

Because those tracking scripts are provided by competing advertising platforms and they want to own the data.

andrewingram

Yeah, I think both these are true:

1. React is bigger and slower than it needs to be. There are likely better choices today. 2. Most websites will be bigger and slower than they need to be due to the endless September of new devs, and the rarity of being given space to focus on size/performance. As React is popular, it means even if React was tiny and fast, these websites would still be slow.

MartijnHols

Why would React be bigger and slower than it needs to be? It's a very mature project with a professional development team behind it, I'm sure we can trust them to tackle whatever unnecessary bloat they may have. I think we should be able to trust that anything that is in there serves a purpose, and that it serves hundreds of niche edge-cases that someone will eventually run into but are non-obvious until it's widely used.

These kinds of statements are only true if you're willing to sacrifice in other areas such as maintainability, security, stability, compatibility, accessibility, extensibility or something similar.

jeffhuys

I get what you're trying to say, but aren't you blowing it a little out of proportion? At my job we have an SPA that loads a dashboard with 20+ widgets, all doing their own requests, transferring 2+ MB (compressed) of JS. It loads in two seconds, with all caches disabled. And I mean full load, not "ready for interaction". It runs on Vue 3.

I agree that the web could be lighter, but "finding one that will do a first load under 10s is close to impossible" sounds like exaggeration - it might not be due to the framework or lack thereof.

Btw, the webapp I'm describing is NOT built by the best of the best.

_Algernon_

Now test it again on a 5 year old mobile device on a 3g connection with some packet loss, not in the sterile environment that is your office with a last-gen i7 processor.

jeffhuys

Well, the post I replied to said "on a 10G connection peered within 5ms of the host" so I think it's fair to assume they also were in a sterile environment. I'm even on a lower connection with 20ms+ ping!

docmars

The thing is, enterprise web applications are not built for phones. This would be like telling someone to run the latest Ubisoft game on a PC from 2-3 generations ago, and expecting it to perform well.

Today's applications are more complex than ever, bloated perhaps, but the demand for features, complex visualizations, etc. rise with the patterns of seeing them more in other applications.

YetAnotherNick

5 year old mobile isn't as slow as you make it out to be. Cheap 2025 phones is significantly slower than my 8 years old iPad. Also 3G could be fast and it isn't the protocol that makes the speed to <1Mbps.

InsideOutSanta

I know I'm weird because I grew up in the 90s, but 2 MB of JS to show a dashboard with widgets still doesn't quite compute in my brain.

jeffhuys

It's not just 2 MB of JS. I'm describing ALL traffic, also the JSONs received, CSS, images, everything.

Besides, we show many charts, and believe me when I say: financial people are PICKY when it comes to chart functionality. It needs to have EVERYTHING or you're not considered serious.

black_puppydog

Heh, I just literally built a toy dashboard in dioxus that loads just about 2MB of code, and then 700KB of css (tailwind, not optimized) and 1.5MB of payload data to visualize. Then again the 2MB includes ~1.7MB of just static data that I included in the wasm build for convenience since it will always be needed. :D

(this was a learning project in my free time, no I'm not defending this in any way, although I'm actually quite happy with the solution of including static data in my binary)

alabastervlog

Transfer's only part of the story (and 2MB is a ton on anything but a great connection)—the rest is memory use, which will tend to be some multiple of the transfer size, plus whatever your code initializes, and processor cycles.

geocar

> I see a lot of people angry at "Nue" in various ways

Interesting. I see people making overlay-broad claims without evidence or justification.

> I deal as DevOps/SRE daily with these services, and finding one that will do a first load under 10s is close to impossible

Nobody is going to call in for your help unless something is wrong, so don't be surprised you haven't seen anything right. That just means people are keeping the good stuff secret (and/or they don't work for your company)

> I can't help but think these are people heavily relying on React and missing the overall issue.

That's too bad.

I think that everyone who works on a slow project knows it's ultimately Management's fault, and when a codebase gets so big that nobody feels like they can fix it anymore, that's Management's fault too.

Maybe you can think if Management called you in earlier you could've designed a better thing, but guess what: I think that would be Management's fault too.

> but I can at least root for them

Can you imagine if any of what you said was really True, everybody believed you, and everybody actually stopped using these "huge frameworks [that] have made the web a horrible slow mess", and that actually solved "the overall issue" so that all software is perfect and reliable? What exactly do you think a SRE does in this case? Do you think that's even a job?

I really suggest trying to look at things differently, because I think for your skills there's a huge opportunity sitting right in front of you if you can see it.

zwnow

Well most stuff going wrong in apps is actually managements fault. At least in my experience. Either directly or hidden in their decision making.

bambax

The real question is, do we actually need "frameworks"? Pure JS works pretty well, and no JS at all even better.

I recently worked on an SAP project where there was a whole Java layer in front of SAP, and then a huge Angular app on top of it all; but since the point of the application was to manage b2b sales of physical things and it mattered very much whether those things were in stock, almost every screen did a full request to the SAP layer. The need for a thick "rich" client was unclear, and PHP would probably have worked much better.

Hype aside, it seems big organizations are using frameworks as a mean to ensure uniform coding practices and make developers more easily replaceable; but surely there are better ways to achieve that.

brulard

Not every page or app needs framework. But building complex app without one would be very hard and time consuming, and your team would need to come up with ways to solve problems like architecture, code structure, routing, data management, state management, etc. So you would basically reinvent all the wheels on your own cost, and you will have a non standard solution, that would not be compatible with libraries out there (for example UI components) and neither with new devs. Before Angular and React came I was building apps with plain JS with jQuery (not a framework, just a lib) and I would never go back there.

sparin9

I agree. In a recent small project, I ran an experiment: first, I built the app in React, then in Vue, and finally in vanilla JS. In the end, I stuck with the vanilla JS version because it was significantly smaller, easier to deploy, and much simpler to maintain long-term.

sensanaty

As someone who's worked on web apps with and without frameworks, yes, we need frameworks, especially if it's a large one or if there's a team of more than a few people involved.

The good ones these days like Vue or especially Svelte are barely any different to how you'd do things the "vanilla" way except they provide some sane QoL features like components (anyone who says web components are the answer has very obviously never used web components) and sane data flow management to and from said components.

I mean, more power to you if you want to handle complex states without the features a lib like Vue or Svelte provide you, but in my experience you eventually end up with a homecooked framework anyways, even for apps that aren't that complex. And at that point you're just doing React or Angular or Vue, but worse in every conceivable way. Yay for going at it vanilla, I guess?

OscarDC

> but worse in every conceivable way

I always had an issue with that sentence (and I heard it a lot). Why would experienced software developers always come with a solution worse in "every conceivable way" when implementing logic answering a problem they're having, which would have the huge advantage of being tailored for their own needs?

I'm more of a library developer than an application one but I've seen that many JS webdevs have an aversion toward trying things themselves - instead always going for the most huge/"starred" dependency when they can. I'm not sure the impact of this philosophy is always better for a project's health than the total opposite where you would just re-invent your own wheel.

I do have seen multiple attempts at doing a specific homemade architecture that worked out well for some applications with very specific needs even 10 years later (For example I'm thinking about a 500k+ LOC JS webapp - not intended to be accessed on a desktop browser, but that's not the only successful long-lived JS project I know with their own archi). And I guess a lot of webapps do have their own specific needs where the "default framework" solution leads to some inefficiencies or hard-to-maintain / understand mess.

bambax

> I mean, more power to you if you want to handle complex states without the features a lib like Vue or Svelte provide you, but in my experience you eventually end up with a homecooked framework anyways

If state needs to be managed client-side (which is not always the case), then yes, a library is helpful. But a "framework" provides much more than state management, and those other things are usually dispensable, IMHO.

j-krieger

> The real question is, do we actually need "frameworks"?

Yes. The advantage of having a common API across thousands of web apps shouldn't be a point of discussion.

onion2k

The advantage of having a common API across thousands of web apps shouldn't be a point of discussion.

We have one. It's called "the browser". The discussion is whether or not we need a higher level API than that. If we do, maybe that should also be a part of the browser's API.

TickleSteve

Pure JS is that interface... you're arguing for multiple unnecessary abstraction layers piled on top of each other.

More abstraction != easier to use.

cruffle_duffle

I worked at a startup where one of the original devs had “strong opinions” on JavaScript frameworks. “It’s all bloat!!! We don’t need that crap”. So consequently all the new engineers had to learn this dude’s codebase, which turned into to be… A framework! Only instead of a documented one that had plenty of support it was an unholy mess that required extra time to build all the stuff missing from the it’s-not-a-bloated-framework-but-pure-JavaScript-framework.

Guess what happened the day after the dude left the company? All the engineers immediately started to replace the unholy mess of “totally not a framework” framework with an actual one.

Guess what happened to development productivity and product quality? They went up dramatically.

maxloh

IMO, this framework is built for use cases normally handled by React-based static site generators. For instance, a simple marketing site for a company. In these use cases, React is obviously an overkill. You wouldn't want your users to download, parse, and execute 2.8 kB of the React runtime just for simple buttons, tabs, and routing.

However, I don't find this framework suitable for more complex state-driven applications. If you want to build X's front end with this framework, you're just shooting yourself in the foot. It won't take an hour before you hit the framework's design limitations.

Just choose the right tool for the right job.

tipiirai

Author here: You’re right that Nue shines for simpler sites—like marketing pages, blog, and documentation. But calling it just a static site generator misses the mark. This latest release (check mpa.nuejs.org/app/?rust) handles a Rust-powered SPA with event sourcing over 150k records—far beyond ‘simple.’ For state-driven apps, Nue’s model-first approach keeps things clean and scalable—limitations are there, sure, but they’re not the foot-shooter you might think. Right tool, right job—totally agree—just saying Nue’s toolbox is bigger than it looks!

girvo

> Nue’s model-first approach keeps things clean and scalable

Like I understand why you say this, but as someone who spent the 2000s building "model first" web apps (and desktop applications), I don't miss it in the slightest. Immediate mode-esque render loops didn't catch on just because it's a fad, it really does fit a lot of highly interactive things better.

Of course the bigger problem is people using something that's great for heavily interactive web applications for building things that _don't need_ that interactivity...

Nue looks great, and I think it stands on it's own two feet. The constant React bashing just turns me off it more than anything (and that's not about React specifically, I have no real love for it, just that kind of project marketing isn't my cup of tea)

maxloh

Thanks for your reply! The misconception might stem from the lack of clarity in the documentation regarding how islands (components) work.

- How do I declare local states (instance variables) in an island?

- How do I fetch and display data from an API?

- Where should we place data that is normally kept in contexts/stores in other frameworks?

These are common problems faced when developing an SPA, but missing in the documentation.

tombl

hmm, it looks like you've got a bug in the demo app. if you type too quickly into the search bar, the entire app slows to a halt.

seems like you'd want to move the filtering logic off the main thread, or you'd want to reinvent React's "Fiber" suspendable rendering architecture.

mapcars

> Web SaaS companies just wanting to use "common" frameworks

Companies obviously want to use what works well and been tested and tried in production. If Nue achieves that with significant benefits outweighting the migration costs it will become the new common.

The "problem" with React is that it improved developer experience and efficiency by a ton compared to what was there before it, and not because of anything else.

rdsubhas

The context of what the application does matters. I'm extremely cautious when people hype up "download sizes", when such size is less than 1MB, because this is usually a sign of cosmetic obsession and/or disassociation from the real world value offered.

A 200-300kb "bloated" single page app which does the job of a 10MB "minimalistic" downloaded store app – is IMHO pretty incredible. It's doing the same work at nearly 1/50th the size, all else being similar (externally loaded images and stuff). Heck, even a 1MB page load size is still 1/10th smaller.

Sure, it can be argued that the browser does most of the heavylifting. The same can be said of Android or iOS too, definitely the OS offers _even more_ heavylifting than the browser.

davedx

This is what they're replacing react with: https://nuejs.org/docs/view.html

It's an untyped view layer kind of along the lines of early angular 2.0.

The model files are plain javascript.

So no typings anywhere. Which is fine, I guess this is targeting the vuejs crowd. Maybe their marketing should pivot a little bit in that direction, most react people now use TypeScript because first class types in your view layer are super useful

tipiirai

Author here: It’s true—Nue’s view layer is untyped. That’s by design. React’s ecosystem has devs slapping TypeScript on everything—even CSS—which is overkill. Nue flips it: presentation stays clean and semantic, web standards do the heavy lifting, and real static typing (like Rust or Go) shines in business logic where it counts. Thoughts on this?

tossandthrow

> ... slapping TypeScript on everything—even CSS—which is overkill

Yikes, this framework will never fare well in any decent sized or above project.

Even Typescript is problematic sometimes, as it has several forms of coercion.

I manage 2 large scale production apps using Typescript (Along with the rest of the infrastructure) with a small team.

This simply would not be possible, had I not been guaranteed that things at least type check when reading diffs from PRs.

mplanchard

This is a silly take. There were certainly plenty of large projects written in JS before Typescript existed or became popular, some maintained by small teams or single individuals. There are plenty of large projects written in Python pre-typing, in PHP, etc.

I personally choose to work with typed languages most of the time, and I’m thoroughly convinced of their value, but acting like it is literally impossible to write a large project without types is just inaccurate.

isqueiros

This seems incredibly shortsighted. If you're building an application by yourself you're gonna remember the relations and dependencies - but even on a small team (say ~4 devs) or even if you don't pick it up after a while, there is going to be stuff you forget.

It's also nice when you move stuff around, you can rely on the LSP to rename and fix everything that breaks. If you have a simple website it's fine, but when you start to have multiple components... Losing typing is a huge deal.

ko27

Having the author come out and say that being untyped is a feature, is definitely one way to kill of any potential interest for that framework.

CharlieDigital

For the record, author is not crazy.

Svelte team also switched to JS with JSDoc a few months back[0].

You can see the majority of their repo is JS and not TS[1]

The cited reason[2]:

    > As a Svelte compiler developer, debugging without a build step greatly simplifies compiler development. Previously, debugging was complicated by the fact that we had to debug using the build step. In addition, using JSDoc does not affect compiler’s development safety because the type is almost equivalent to TS.
There was a lot of noise when this happened. Rich Harris (Svelte team) even had a comment on this on HN[3]. Dev sphere similarly thought they were crazy. But Svelte seems fine and no one seems bothered by this now.

As long as author ships type def, it should behave just like a TypeScript library for all intents and purposes.

[0] https://news.ycombinator.com/item?id=35932617

[1] https://github.com/sveltejs/svelte

[2] https://github.com/sveltejs/svelte/pull/8569

[3] https://news.ycombinator.com/item?id=35892250

tipiirai

Author coming out here: Types matter, and Nue’s take is to use them where they truly shine. Adding them to naturally untyped spots like HTML or CSS? That’s just extra weight we can skip.

spiffytech

Personally, I consider it a strike against a frontend framework if I can't type check my templates. They're entirely data-driven — exactly the kind of place where type checking is the least effort but still a a big help.

In any nontrivial project, templates become a large fraction of my LOC, and it's already challenging to confirm they work right and don't break. Type checking that I'm passing in the data they expect, and that they're reading valid properties, is a cheap way to get a big win.

Web standards are great, but I'm not sure what "heavy lifting" they do that would make me feel like type checking was unnecessary.

mubou

I agree. It's far too easy to make a change to your model that removes/renames some property, but not update one template that you forgot uses it too. Without screendiff testing, that sort of bug will easily make it into prod.

This is one of the reasons I like C#'s .cshtml (Razor) syntax. The entire file is compiled to C#, so when you do `<div>@Model.Foo</div>` the build will fail if Foo doesn't exist. String-based (rather than compiled) view templating is, IMO, a mistake.

anentropic

I am not on the React bandwagon, currently using HTMX

But I would very much prefer to see TypeScript in a framework. Optional TS is ok but "untyped by design" feels like an anti-pattern, even HTMX has TS types available.

mexicocitinluez

> React’s ecosystem has devs slapping TypeScript on everything—even CSS—which is overkill

"We don't use Typescript because there are people that exist who use it for CSS when using React" is one hell of an argument that makes absolutely zero sense.

ellinoora

Making zero sense of your own take of the argument makes absolutely zero sense

tshaddox

I probably have nearly the exact opposite opinion of where static typing is the most beneficial. I think it’s precisely at the UI rendering layer, because that tends to be where you’re dealing with the data types with the largest number of properties, deep nesting, etc.

littlecranky67

I pretty much enjoy using MaterialUI with React (MUI) and have statically typed CSS: `<Stack sx={{ alignItems: "center"}}></Stack>` - I get full IntelliSense/autocompletion for the sx props (i.e. alignItems when typing 'al') and their value (i.e. 'center' when typing 'c') etc. Sx-props are composable, so you can centralize common used sx/css etc.

Any typos or invalid props/value will result in a compiler error.

epolanski

> I guess this is targeting the vuejs crowd

Vue is written in TS and has first-class support for it, even at the template layer.

IshKebab

Only since Vue 3 though, and the types are still not as good as React.

epolanski

Vue 3 has 6 years at this point.

Also, could you expand on the fact that types are "still not as good" as React?

Can you make an example?

bigjump

Most of the Vue devs I know, also use TypeScript for the same reasons.

dlisboa

> most react people now use TypeScript because first class types in your view layer are super useful

Most people use TypeScript because React apps have grown to 200k lines of mostly entangled code with business logic and are unmanageable without it.

If one goes in a different direction there's less need for it.

cruffle_duffle

I mean a rapidly changing front end codebase is always going to be entangled mess no matter if it’s react, plain JavaScript or even “native app code”. Front ends are where the rubber meets the road and have to deal with fuzzy weird human shit and miles of edge cases. That is just the nature of the beast.

Even if you attempt to tame it and make “the prefect codebase” it’s still gonna be a mess.

If anything React and typescript help it from being an even larger mess full of homegrown idioms that are normally baked into the framework.

There is no such thing as not using a framework. You either pick an existing one or build your own. Very often the sensible choice is to pick an existing one.

dmix

You could always massively reduce the frontend by not duplicating half the backend business logic in the browser. By not having isolated backend/frontend teams off in their own worlds and only using fancy JS where fancy JS is actually needed.

Server rendering of JS only gets you partially in a better state when the fundamental idea is based around generating a massive amount of JS for the browser.

WuxiFingerHold

> I guess this is targeting the vuejs crowd

Typescript support and usage with Vue is very large. Vue itself is written in TS and most large libs are also written in TS. According to /r/vuejs and my personal experience also most new apps.

null

[deleted]

wg0

This is great. But I went for Svelte. Invested in Svelte and SvelteKit. Wrote a decent sized app (not toy example, pretty feature right, tens of forms and screens if you will) and later I looked back at React.

And I discovered that:

  - React is not that hard if you understand the hooks.

  - React is lightweight too. For my use case at least.

  - React is boring technology at this point which is good.

  - The ecosystem is huge. You cannot have React Query like library and that's just one example.
So I'm sticking to React for next few years especially when the React compiler is already being used inside Facebook and Instagram and released as public beta.

Even React Native supports React compiler and I don't see this support going away rather getting better.

PS Edit: React compiler leaves not much for runes in Svelte or its compiled nature. I don't like Svelte much after runes because it feels like you're not writing Javascript rather a notation that looks like Javascript. Post React compiler, much of the hooks hell is not needed in complex scenarios.

brulard

TanStack Query (formerly known as React Query) is absolutely compatible with Svelte. https://tanstack.com/query/latest

I work with react for a decade now, and with Svelte for past 3 years. Svelte is obviously a newer generation of framework, and works for me a lot better than React. But I agree there are some rough edges, mostly around the ecosystem

wg0

No, the support is quit limited not as many features are supported.

pier25

Svelte is definitely much less verbose and requires less code. Performance is also way better but it might not matter for many use cases.

The drawback is that since Svelte is really a language[1] you now need a compiler and custom dev tools to make it all work. This requires some serious effort to maintain and evolve.

I love Svelte and have been using it almost daily for years... but the team really needs more resources to accomplish their vision and maintain it for the foreseeable future. It's amazing that huge companies like Apple are adopting Svelte (eg: Apple Music) and not investing in it.

[1] https://gist.github.com/Rich-Harris/0f910048478c2a6505d1c321...

iammrpayments

I transitioned to svelte and I’m finding it around 3x to 2x times less complex than React

newswangerd

I learned React back in the class component days. I recently picked it back up and found functional components and hooks to be absolutely baffling. Does anyone know why they went down this route?

wg0

Trust me, the function based components are way too simpler. Just a function that returns HTML. That's it. compose your UI as those functions. These functions can take arguments to customise their output (rendered HTML) as arguments (called props) or can call special functions from React (called hooks) such as asking the React to "remember" a value for you (state) or cache something for you (useMemo) so as to not compute it every time or trigger rendering if value of certain variables change (useEffect) or at the component start (useEffect with no dependencies mentioned) and that's all the React that you need to know for I would say your 95% of the needs.

React compiler (already used for Facebook and Instragram code base) further renders the use of certain hooks unncessary thus making React a lot more simpler.

jfcisco

Hooks require less boilerplate to set up and reuse stateful logic across components

If you havent watched it yet, the talk that introduced hooks explains much better than I can: https://youtu.be/dpw9EHDh2bM

codedokode

I wish instead of this marketing article there were technical details, for example: what method of change tracking is used (proxies Vue-style or recomputing everything React-style).

Also I didn't understand the phrase about JS "overflowing stack" with 150 000 objects. I created a list of 150 000 objects with the following code:

    var list = [];
    for (var i = 0; i < 150000; i++) { list.push({ id: i, name: `Name ${i}`, weight: i * 100 });  }
According to profiler, this array (with objects) uses 14 Mb, where 2 Mb is array and the rest are objects and strings. Running list.find() without any indexes also doesn't overflow the stack. With indexes it would probably be lightning fast and won't need any WASM and complications.

JS is not that slow. And if you do numeric computations (i.e. multiplication of numbers in large arrays) the code gets compiled and runs pretty fast.

uasi

The author uses something like `list.push(...objects)` in his demo code, and I believe this is the culprit. Passing many (~100,000) arguments to a method at once using the spread operator is known to cause a stack overflow, because, in JavaScript, each argument is placed on the call stack.

oxidant

Spreading arrays and objects is such a common performance hit. It works fine for small instances but falls over in large instances.

Here's the JS CRM engine https://github.com/nuejs/nue/blob/master/packages/examples/s...

I see a number of issues, but don't have time to look into them.

1. Spreading when you probably don't need a copy: sortEntries. Sorting is probably where the overflow happens. Just sort in place or use Array.from or slice.

2. Excessive use of array functions. In my experience, a C style for loop performs better when you need performance. Create an empty array before, perform your business logic inside the block, and push to the array.

3. I don't know how filter is called, but it potentially loops through all of the events three times in the worst case.

4. paginate manually creates a JSON string from the returned entries. I don't know why, it seems inefficient.

tipiirai

Nue’s a web framework I’m building to slice through modern web dev bloat. When a Vite/ShadCN/Tailwind button is 40% heavier than a full-blown SPA, it’s time to do things differently. We’re retooling from the ground up—web standards first, no bloat. It’s for frontend architects, design engineers, and UX folks craving simpler, saner workflows. Still in progress, but the shift’s coming. Curious to hear your thoughts!

pier25

Nue is a very cool project but if you want people to take the project seriously you should probably tone down your confrontational marketing :)

Also, I checked the demo and there's like 100kB of WASM code you're not taking into consideration in that React button comparison?

Anyway, congrats on the project. I'm really curious to see how the whole vision will turn out.

kigiri

100% agree, I felt very put off by the tone, I think HTMX pull it off by not taking itself too seriously and also having good insights.

I wish the homepage talked more about how nue approach the problems rather than how better than other framework it is.

tipiirai

I think you're right on the marketing. I'll tone down.

The comparison uses the non-wasm version at mpa.nuejs.org

azemetre

If you want an alternative view, I like the confrontational tone. You know what you excel at and attack your competitors with it.

I really dislike how all the other JS UI libraries are basically the same and espouse the same ideas.

Svelte was way better when Rich Harris was straight up attacking react devs at conferences and shaming them for poor performance.

Being "nice" just ensures entrenched players stay entrenched.

dmix

If you're actually doing something better and your results actually stack up under scrutiny I don't see the problem.

I think most people get uncomfortable because it's often untrue in marketing. So if it's true (to the best of your knowledge and after outside probing) then by all means.

JodieBenitez

At this point I don't even understand why everything has to be a SPA. It's complicated and inefficient and should probably be only used with highly interactive applications like some kind of Photoshop or Ableton live for the web, which means very few apps should use this paradigm. Granted, I'm not much of a frontend dev... but what I know is that if "instant search and other operations over 150,000 records" is a problem then it's probably best to re-think the paradigm.

DecoySalamander

With SPA, all your backend has to do is spit out data and sometimes validate it, leaving your front-end completely in charge of presentation and user interaction. You can even have completely separate teams working on it. It feels a lot less complicated than the alternative.

Sammi

Yes Conway's Law:

https://en.wikipedia.org/wiki/Conway%27s_law

The law is based on the reasoning that in order for a product to function, the authors and designers of its component parts must communicate with each other in order to ensure compatibility between the components. Therefore, the technical structure of a system will reflect the social boundaries of the organizations that produced it, across which communication is more difficult. In colloquial terms, it means complex products end up "shaped like" the organizational structure they are designed in or designed for. The law is applied primarily in the field of software architecture, though Conway directed it more broadly and its assumptions and conclusions apply to most technical fields.

zozbot234

That "backend" vs. "frontend" split is entirely artificial. That code you would run server-side to convert your data into a fully-rendered page is still very much part of your "frontend" organizationally, even though it might be hosted on the server.

(Strictly speaking you can have a web service that's purely about spitting out raw data in a form that other organizations can use, but that's the kind of thing that Semantic Web and Linked Data standards are intended to address. Not something that your garden-variety website has to be concerned with.)

pier25

OTOH you now need an API and glue code in the frontend. I'm not saying it's not worth it but it's definitely more work.

JodieBenitez

That's a debate spanning multiple decades. Your last sentence is not true all the time.

n2d4

SPAs are great for the hordes of B2B SaaS apps out there, which for the most part are just some fancy variants of a table. They're not a Photoshop, but they're still highly interactive.

jack_riminton

I think the exact opposite is true, B2B SaaS apps don't need to be an SPA to deal with fancy variants of a table. You can create highly interactive UI with things like Rails and Hotwire, sprinkles of JS or even HTMX. SPA's are bloat and often driven by designers who focus on flashiness rather than good UX.

tipiirai

If you look at the documentation at nuejs.org/docs, you'll see how Nue is really more about apps that focus on content rather than single-page apps (SPAs). However, this release is all about SPAs.

JodieBenitez

Yes, sorry for venting on your thread. I do appreciate the idea of leveraging web standards though.

WuxiFingerHold

I recently thought about just using ASP.NET MVC with Razor pages for a quite simple app at work. But I'm already familiar with SPAs, so with that background I chose to "just use Vue as always (or Solid or Svelte, I like all three of them)" as SPAs have some advantages, e.g. separation of concerns, easier integration of libs like agGrid or eCharts.

Without that knowledge, I agree that good old SSR (MPA) is easier and more maintainable. And more robust.

neals

Both way can work fine, enough great examples out there. The real problem is, imho, we shouldn't need a (graphical) UI at all. That's where all this discussion comes from. When the whole "frontend" disappears in a year or 10, it will make a lot more sense.

bodantogat

This happened to a team I know. They built a flashy SPA dashboard because it was easy to copy-paste from templates. It worked great—until a real-world requirement, like a data grid, came along.

Cthulhu_

There's a crossover with crossplatform apps (like React Native), which is a force multiplier for some applications / orgs / etc.

furstenheim

Not the discussion, but SPAs are fundamentally safer against XSS, in the sense that data and code have different paths.

Cthulhu_

I don't think the "a button in X is 40% heavier than an SPA" is a fair comparison; including a framework will add weight, but these frameworks are not intended for single components. Compare apples to apples, then we can make a fair comparison.

That said, how does Nue compare to htmx and other frameworks leveraging the modern web standards?

MartijnHols

There is no such things as a true apples to apples comparison for libraries such as this. They all cherry pick something and ignore a ton of things such as:

  - accessibility
  - amount of libraries with plug-and-play solutions to common problems
  - security
  - scalability
  - rendering performance
  - maintainability
  - browser support
  - browser extension interference
  - hundreds of other niche edge-cases that someone will eventually run into but are non-obvious until it's widely used
React is really well-thought out and well made by hundreds of professional contributors that have worked on it for years. The premise that hobbyists can make a better overall solution in less than 8 months is strange. At best they can make a smaller solution, but it will have to sacrifice in other areas.

maccard

React and the react ecosystem fail at many of the criteria you’ve listed. You might argue “that’s not reacts fault” but when I look at a website that takes 15+ seconds to load its content on a gigabit connection , I’m never surprised when it’s react. Lots of sites have massive issues with rendering performance, scalability and maintainability even with react.

What react does do is give you a clean separation of concerns across team boundaries and allow for reusable components . But the cost you pay for that is a boat load of overhead, complexity, maintainability concerns, and react specific edge cases

null

[deleted]

t-writescode

  - htmx    = 14k as min.gz
  - solidjs = 7kb as min.gz
htmx for "easy" html, solid for reactivity. Don't know how much more Nue provides; but, there you go for numbers.

tipiirai

Is there a full-blown SPA demo made with htmx?

whatever1

How is Vite relevant to the discussion? It's like saying the UI based on Visual Studio is lighter.

tipiirai

Because Vite emphasizes "Optimized build" in their marketing

notpushkin

Slower builds might make developers more thoughtful of the bloat, but I still think it’s tangential.

That said, how does Nue compare to, say, Svelte?

isqueiros

I'm not sure if I got this correctly, but it seems like you're misunderstanding what Vite actually is or does.

For having built what is essentially a bundler, I would've guessed you were more familiar with what it does, or, perhaps even have used it to build your tool.

Vite can bundle framework-less html files. It can create an SPA without any JS faff. You just have to point it to the right direction. When you instantiate a Vite app, you have to make the conscious decision to use React under the hood.

As for Nue, I think it's a cool idea, but I don't see what it does that I couldn't do with Astro, which has way larger community support and can work with pretty much all JS frameworks OOB.

BTW, I think it's really disingenuous to compare a React SPA bundle with an SSG output. You have essentially no functionality for handling state mutations beside events. You could achieve a much better middle ground by using a compiled framework like Svelte or Solid.

klysm

Incredible marketing blurb! Not a single bit of detail about how this works

n2d4

What do you mean by "lighter than a React button"? Do you mean lighter than the entire React runtime, plus a React button?

If so, that's somewhat disingenuous because even though a page with a single button would require the entire runtime, a second React button would be significantly cheaper than that.

tipiirai

Yes. React runtime included. Benchmark and details here: https://nuejs.org/docs/react-button-vs-nue.html

Fulgen

As the previous commenter said - you don't need a new runtime instance per button, so the comparison doesn't really work (for the smallest binary size, you could provide a native application doing the bare minimum to display the UI too, if the platform has an OS-provided UI framework).

It's still a neat toolkit, since not every website needs a big framework - but comparing runtime sizes is like choosing C over C++ because a `int main() { printf("Hello World\n"); }` binary is smaller.

muspimerol

This comparison is disingenuous and off-putting. When I read "a React button" I assume you are talking about `<button>` and the React runtime, not some third party libraries.

arewethereyeta

flawed example for a framework. Tell me...are 2 buttons going to be 80% heavier? why use react if all you build is a button? you need a tractor to pick your groceries from store?

canterburry

Most new frameworks start as the "lightweight" option to whatever more mature options exist at the time. This is no argument for adoption.

Please post again 10 years from now after you have added all the bloat your users request and handled all the edge cases you don't yet understand.

If you are still lighter than a react button...that will be news worthy.

mplanchard

So, nothing is worthy of discussion or can claim any benefits over the incumbents until it has become an incumbent itself? How is it supposed to attract the necessary users to get bloated if they can’t talk about it in relation to the established players?

canterburry

All I am saying is that being lightweight, when you have been around for less time than a mature solution, is a mute point.

It's a cop out way to differentiate because you are clearly not comparing apples to apples.

You have a fraction of the features and a fraction of the bug fixes. You are trying to make it sound like you are a 1:1 replacement, when you are not.

floydnoel

FYI, you probably meant to say “a moot point.”

https://www.grammarly.com/blog/vocabulary/moot-point/

iammrpayments

I don’t think React has ever been considered lightweight, judging from the mostly negative reactions from this website when it first came out.

dmix

JS frameworks have often valued DX first over what it outputs. Frontend devs also frequently care more about a) their own tooling and b) how it looks, to a much higher priority than the performance and stability of their output. At least from my own experience in the community :)

internetter

Solid.js is doing amazing w/re to its bundle size. Its been in development for something between 6-9 years depending on how you count and it is still very very slim.

is_true

I feel the same. I started using svelte to build widgets with few requirements that were deployed as web components, it was great for that.

edweis

Looking at the project:

  - Why is the demo impressive https://mpa.nuejs.org/app/ I believe someone can do the same web-app in React with the same performance.
  - I'd like to quickly see some code samples on the home page. I had to dig the documentation to find some code samples (https://nuejs.org/docs/view.html#clean-html-templating), is it inspired from Svelte ?
  - How is new faster and lighter compared to other tech? Specifically, compared to raw HTML/js.
To convince me that Nue is a framework worse using, please show that Nue:

  1. Is simpler than HTML+JS (or at least simpler than react): like https://alpinejs.dev/
  2. Is easy to understand: maybe the markup and logic are close to HTML or something else I already know
  3. Has a better DX with good build time and HMR: you nailed this one
  4. The tech is better: low overhead? highly based on WASM? virtual DOM? Server islands? 
  5. Show me metrics: https://esbuild.github.io/ nailed this one

arijun

> Why is the demo impressive https://mpa.nuejs.org/app/ I believe someone can do the same web-app in React with the same performance

Weren't the main points on the main page that it was small ("lighter than a React button"), and could handle large amounts of records ("far past where JavaScript (and React) would crash with a stack overflow error")?

KTibow

Those points are only true if you're comparing to a React app that uses bloated frameworks and inefficient list manipulation (as other commenters pointed out, `list.push(...items)` causes problems)

greg0r

If the authors of this project mean to say that a button in react wouldn’t work without including the react library (which is why the button is supposed to be 73kb), it’s a weak point, because the react library would be reused by other parts of the app bundle at this point.

This is misleading to people and the promise is so shallow that it almost feels insulting.

tipiirai

I’m the author. To clarify: a button installed via ShadCN/Vite’s official docs (https://ui.shadcn.com/docs/installation/vite) ends up way heavier than a full Nue SPA. It’s not a jab at React devs—just showing how web standards can flip the script on bloat. Any thoughts on framing this comparison better?

mapcars

Can you give some examples of some of these standards that make Nue stand out and other frameworks don't use? It seems that if other frameworks make use of these standards we would get a similar performance boost across the ecosystem.

xoxosc

Seems like it should be Meta with billon dollars that should be doing that. The whole point is framework like React are made for DX and dev flow at company of that size.

haburka

Mention that you know you are missing dozens of features instead of blaming it on “web standards” would definitely help frame it better. Do you think Vite doesn’t know about web standards? It reads pretty naively.

Also I recommend just not making a web framework. There are many of them, some very similar to Nue. Your effort could be placed on improving what is out there. I suspect that is a lot harder and less fun than just making something new. But if you manage to contribute then you’ll be helping an entire community of people whereas a new web framework will likely see almost no adoption before it is abandoned.

xandrius

It's like someone making a hello world in C using the std, then one hand crafting the console print but losing literally everything else. Of course, if my goal was to just write hello world then it would make sense but 99.9% of people in the world will use something else, invalidating the point.

chippiewill

Maybe don't compare apples to oranges at all. No one is using react for a single button.

leonhard

I really like the approach but the demo [0] doesn’t really work on iOS Safari (although might be my outdated 16.7.8 version). Scrolling doesn’t work, the layout and buttons have weird line breaks, the native search button is embedded in the custom designed one, leading to 2 icons…

[0] https://mpa.nuejs.org/app/

aziaziazi

Scrolling works now on iOS safari! That was a quick fix. Thanks to the author (and bug reporter!)

jeffhuys

Now do macOS Safari......

Timon3

The author is using a trick they've used in almost every past submission: They implement much less than the component they compare themselves to, and then show how much smaller their own solution is.

tipiirai

How is the SPA less than the button?

aziaziazi

It’s not the button that’s big but the stack [0]

> Built with Vite, TypeScript, Tailwind, and Shadcn/UI, following the official ShadCN/Vite documentation exactly — no additions or removals.

Would be interesting to run Webpack Bundle Analyser [1] (or similar for vite bundler) to see if the proposed stack in the doc is bloated by some major dependencies.

0 https://nuejs.org/docs/react-button-vs-nue.html

1 https://www.npmjs.com/package/webpack-bundle-analyzer

Edit : seems the question I was responding for was a rhetoric question posted by the author. I guess the « smaller that a button » is a smart catchphrase but I wouldn’t use it for too long as soon a Nue becomes popular. Great work, I wish you much success and hope to use it in day to day work some time soon !

Timon3

Does your button component implement all the functionality included in the Vite/shadcn bundle? E.g. the different variants, states, loading etc.?

I'm sorry if it does, then I'll take my accusation back, but I've seen this happen in almost all of your Nue submissions. People keep bringing up this criticism, and you never retract your misleading comparisons.

null

[deleted]

jampekka

Page height/vertical scrolling is also broken in both Chrome and Firefox on Android. On FF the comment box gets hidden under the menu bar.

Probably the page height gets forced with percentage or vh, which should be usually avoided. If forcing is wanted, svh or dvh should be used.

n2d4

Are there any code examples? I've looked for a bit but haven't found any. That should IMO be the first thing on any blog post about new frameworks.

tipiirai

There are currently two examples:

- `nue create simple-blog` This highlights content-driven websites.

- `nue create simple-mpa` This is today’s SPA demo, where 'MPA' stands for multi-page applications. It shows how client-side routing and view transitions can seamlessly connect content-heavy pages with app-like views.

Source code here:

https://github.com/nuejs/nue/tree/master/packages/examples

noodletheworld

Is there any documentation about them?

For example what is this 200kb binary for?

https://github.com/nuejs/nue/blob/master/packages/examples/s...

brundolf

I also spent five minutes clicking around and couldn't find a sample of what the code looks like

h14h

IMO talking about the “heaviness” of popular web frameworks is way too simplistic to be actually meaningful.

How light or heavy an app feels, in my experience, has very little to do with initial bundle size, and far more to do with how adeptly the developers have solved the distributed systems problems of their app.

Are images compressed and cached on a CDN? Is linked content pre-fetched? Does the app avoid unnecessary roundtrips to the server?

These are the questions that truly matter, IMHO. They’re also things that junior devs are likely to get wrong.

All that said, I agree that you tend to see far more sluggish websites written in React than in any other framework. But personally, I think that’s a consequence of React being popular, and attracting a larger proportion of devs who miss important details.

I share this opinion of Electron, BTW.

crabmusket

And importantly, does the app have clear loading states when it has to block on something? Making sure something happens immediately can make things feel fast even if you're waiting on the network.

zozbot234

> Does the app avoid unnecessary roundtrips to the server?

Guess what, using server-rendered pages avoids all unnecessary roundtrips by definition, because the entire page is loaded in one go. You can augment a server-rendered site with client-side SPA features for seamless interaction within the page, but that's not a key requirement either.

robertoandred

Rendering and loading an entire new page just to open a dialog seems pretty unnecessary to me.

bryanhogan

Yes, React is huge, but I also see it used for everything and everyone when it's really not the right tech-stack in many situations.

Just need a simple interaction free site? Use Astro.

Need some interaction? Use Svelte. Larger project? SvelteKit.

Need a more established solution? Use Vue.

Working in a huge team and need a highly opinionated framework with strict conventions? Use Angular.

More than 99% of websites would be sufficient with Astro though. And when just some interactivity is needed it is always possible to add Svelte / Vue / Solid / Alpine / HTMX on top of Astro.

mplanchard

Weird that the current state of things for a simple, noninteractive site is some kind of framework and not just “write the HTML with a little JS where needed,” which works perfectly well and requires no additional baggage.

klysm

React itself is not huge