Top
Best
New

Posted by Bogdanp 9/2/2025

Next.js is infuriating(blog.meca.sh)
1030 points | 579 commentspage 14
catlover76 9/2/2025|
[dead]
skeezyboy 9/2/2025||
a lot of this BS is avoided when you code native you know.... was the sole benefit to web (not having to distribute new binaries) really worth it?
celicoo 9/2/2025||
Reading through all these comments gives me hope. Finally people are speaking up about what we have all been experiencing in isolation — the gradual enshittification of Vercel/Next.js in service of Vercel's business model.

The middleware issues the OP describes are not bugs, they are symptoms. When you can't get basic logging to work, when you can't use WebSockets, when you are forced to deploy on edge runtimes that don't support Node.js APIs — these are all deliberate choices to push you toward Vercel's platform. Guillermo and his team have prioritized their cap table over the open web.

This is why I started https://github.com/openuiai/next.js last month. The web is humanity's greatest collaborative achievement. We are building toward a global, decentralized network that should enable unrestricted computation and storage for everyone. And for that to actually happen, we need frameworks with the power and flexibility that Next.js used to have. But instead we are all watching Vercel carve it up to lock developers into their platform

Next.js used to be great. Now it's a trojan horse for vendor lock-in. The fact that so many developers are comparing it to SharePoint and Lotus Notes should be a wake-up call.

To everyone frustrated: you are not wrong. The framework is ACTIVELY working against you unless you are on Vercel.

I'm working on OpenNext.js every single day — still climbing the learning curve of the massive spaghetti codebase, but fully committed. We are already running OpenUI on a fork with full Node.js middleware support and native WebSockets. These will merge into OpenNext.js once I have properly cleaned out the cruft (their CI/CD alone has cost me $400 just figuring out how to untangle it). But I'm taking the time to do this right.

Guillermo: Vercel/Next.js shouldn't dictate where we can deploy. It should respect the open nature of the web. You know this, but you chose the money instead.

ale 9/2/2025|
To be fair Next.js is just following the natural progression of what their product always has been: holding devs' hands in all things deployment at the expense of vendor lock-in. Being aware of Vercel's limitations is not about the open web, it just means you should be setting up servers yourself at this point.
dizlexic 9/2/2025||
This

I was talking to a fellow dev at the company I work at and he was extolling the virtues of one-click nextjs deployments. As the conversation progressed it turned out he'd never actually had to set up or manage his own servers and felt that it was a waste of time for him to learn.

It hurt my soul. I am considering linking this article, but i feel it may come across as aggressive.

sarreph 9/2/2025||
I convinced myself to hate App Router before even trying it because of all the negative sentiment on HN.

After using it in three production-scale projects now, I think it's a great isomorphic JS / TS framework. It's as close to a "batteries included" (such as Rails or Phoenix) system that the JS ecosystem has.

And yet, people generally like to shit on Next.js I sense because they haven't taken the small amount of time investment required to actually just understand it: which I fear is especially true if they came from Pages Router. This kind of fallacy appears to hold true in the OP -- bemoaning that you "can't have multiple middlewares or chain them either"... yes, you can? Sure, it's different from the Express way of doing things, but you absolutely can get it to do what you want.

Was Express ever _that_ easy before you actually understood it and knew what you were doing?

dizlexic 9/2/2025|
> Was Express ever _that_ easy before you actually understood it and knew what you were doing?

yes

also sails.js was the bomb.

usernamed7 9/2/2025||
as a Rails dev this makes me LOL. I would have expected the rube goldburg machine of JS frameworks to be more robust and ergonomic by now, but it looks more to be hacks built on top of hacks with no real vision or technical leadership.
Tade0 9/2/2025||
RoR wasn't picked up by e-commerce at this scale. Most of the craziness comes from attempting to squeeze out every last inch of performance so that the prospective client won't go "neeeih" and shop somewhere else.

A RoR app will just sit comfortably wherever you deploy it, slowly doing its job like a good, reliable tractor.

A typical Next.js app is smeared all across its origin, some geographically convenient Edge and the frontend. It's a very different use case.

usernamed7 9/2/2025||
what do you mean? Shopify is the largest eCommerce platform and runs rails.
fredrikholm 9/2/2025||
I think they mean that Shopify doesn't decide what happens or doesn't happen to Rails; Vercel decides what happens or doesn't happen to NextJS.
hit8run 9/2/2025||
Tobi is Ex-Rails Core contributor and Shopify is significantly contributing to Rails and Ruby.
b_e_n_t_o_n 9/2/2025|||
Like said in the article, most other JS frameworks are actually pretty good these days.
zwnow 9/2/2025||
I work with Vue 2 and Vue 3, both options and composition APIs and both are pretty great. I dont know how it's like for very complex UI but it 100% fulfills my needs.

Also shout out to Pinia, I love you!

sensanaty 9/2/2025||
I have a monstrosity of a Vue 3 project at work and I far prefer it to any "elegant" React codebase I've ever had the displeasure of working with. Boggles the mind that React still has any mindshare to me, Vue and Svelte are both superior to it in pretty much every way except for availability of component libraries (which isn't so relevant in my line of work), and a slight edge in terms of TypeScript support (mostly a problem with Vue's props).
sfn42 9/2/2025|||
I think React is fine, the problem is that every single react app I've inherited is ass - people just do everything incorrectly and overcomplicate simple things. Components with like 5 different useEffects, huge global state causing all kinds of bugs, way too much frontend logic in general. The amount of JS code that exists just to mimic things you can do with HTML and CSS is staggering.

Everyone complains that react is so slow and horrible, it isn't. It's their code that's slow and horrible, react is snappy as hell when you use it properly.

sensanaty 9/2/2025|||
> It's their code that's slow and horrible, react is snappy as hell when you use it properly.

That's the problem though, it's hilariously easy to shoot yourself in the foot with React. If almost every project makes the same common mistakes, it ceases being an issue with the people using it, it's a broader problem. With Vue or Svelte you'd have to try damned hard and go out of your way to mess up in similar ways, because the idiomatic way of writing Vue, especially with Options API, is so simple and straightforward. How many articles do we have out there begging people to please stop using `useEffect`, for example?

Plus, React's reactivity model is terrible and a source of a lot of performance pitfalls. Vue's and Svelte's Proxy/Signals-based approach is much more performant out the gate, and in the case of Vue the diff reconciliation algorithm is a lot better than React's, which itself will already prevent a bunch of useless re-renders compared to 'standard' React apps.

sfn42 9/2/2025||
I don't know Vue so I can't compare. All I know is when I write react apps they're simple, nice and snappy. And I'm not even a frontend dev nor a JS dev, I mainly work backend. It's not that hard. In fact it's significantly harder to write a horrible mess. I have to spend ages cleaning up before I can start doing real work, because I can't deal with the horrible messes people make.

This isn't just a react problem by the way, people write horrible messy backend code as well so I'm having a hard time believing that they wouldn't find a way to make a horrible mess of a Vue app as well.

But maybe you're right, maybe it is better. I wouldn't know.

sensanaty 9/2/2025||
I mean don't get me wrong, I'm not saying Vue is perfect, it has its share of annoyances that I hope get resolved, mostly around poor typescript experience with things like props and events for example. But for your average day-to-day Vue experience, it is in my opinion so much more productive than React, and importantly for the less skilled/knowledgeable members of the team it's so much harder to fuck up than React is. And as I said in my original comment, the codebase at work I maintain is a monstrosity, but because of Vue's patterns it's also easier to deal with and fix than the equivalent fucked up React version would be.

I'd recommend giving it, and especially Svelte, a try, especially with Options API in Vue (but CompAPI is nice too). It's really clear early on how simple it is, despite it paradoxically having more to it than React does (like the event/prop system)

zwnow 9/2/2025|||
> Everyone complains that react is so slow and horrible, it isn't. It's their code that's slow and horrible, react is snappy as hell when you use it properly.

Why use something that you have to use "properly" when there are things out there that enforce being used properly?

sfn42 9/2/2025||
Because I'm not convinced there exists a programming language/library/framework that you can't use improperly.

And just to be clear I'm not saying react is better than Vue. I don't know Vue. Maybe it is better. All I'm saying is react is alright in my experience, the problem is people overcomplicate and mess things up. I've seen that in pretty much every piece of software I've ever worked on, backend/frontend/whatever. So the claim that Vue just magically can't be messed up is difficult for me to believe.

zwnow 9/2/2025||
I can understand that. For me personally, Vue has a limited set of lifecycle hooks you can use so its hard to pick the wrong one. React on the other hand gives u some kind of use_ for everything, so its first and foremost harder to understand the app lifecycle and to pick the correct hook.

With Vue I started to use Pinia for my whole apps state management, which are data stores. Clean and centralized logic, with React idk what a substitute would be.

I know React can be clean too, but that (in my opinion) requires a lot more depth of knowledge about the framework.

porridgeraisin 9/2/2025||||
Yeah, vue is really easy to work with, conceptually simpler and has so many more niceties.
zwnow 9/2/2025|||
Yea I would agree. I do not use component libraries ever as I prefer building my own. But I also know that stuff like shadcn also has Vue variants.
thiago_fm 9/2/2025||
Yet 95% of fresh companies raising funds use that cursed NextJS framework.
cpursley 9/2/2025||
This feels a whole lot like when everybody with VC cash was using Mongo. And I see that as a competitive advantage if your competitor is using these types of technologies, it means you can out maneuver them and build a better product.
pjmlp 9/2/2025||
I don't get these kind of complaints, coming from Java and .NET web frameworks, Next,js is the only sane frontend framework followed by Angular.

Saying this as someone doing Web related development since 1998, glory days of Perl and CGIs.

Etheryte 9/2/2025||
I don't think the post is an unreasonable complaint. The fact that you have to even think about how to get logs out of your application is insane, never mind all the hoops you need here. Logging should be a first class citizen in anything that goes to production.
pjmlp 9/2/2025||
Interesting, because that is hardly so in most frameworks, logging requires additional libraries and configuration almost everywhere.
Etheryte 9/2/2025||
In most languages and frameworks logging is as simple as import, initialize, done. Here it's far from it.
pjmlp 9/2/2025||
Really, which ones?

Because anything Java, .NET and Python, it certainly requires configuration and related infrastructure.

Summershard 9/2/2025|||
> .NET

I think you haven't used .NET in a while. Nowadays, logging is absurdly easy to configure. Heck, you usually don't even need to configure it, because the basics are already included in most templates. You just use the Logger class and it works.

The only time you have to spend more than 30 minutes on it is when you use some external logging libraries. And most of them are quite sane and simple to use, because it's so easy to create a custom logging provider.

pjmlp 9/3/2025||
I use it almost every day.

Java, .NET and nodejs are all over the place around here.

The point was without configuration.

Logger class doesn't do the work for production monitoring, without additional configuration so that its output appears on the necessary production dashboards.

Etheryte 9/2/2025|||
Log4j can be as simple as add the dependency and you're good to go. Of course, you can do fancier setups and bridge your logs wherever where it is more work, but out of the box, it's very straightforward and batteries included. I have a very hard time believing you're seriously arguing the case that some of the most commonly used languages don't have good options for logging.
pjmlp 9/2/2025||
Which Java framework has log4j working out of the box for serious production deployment?
Etheryte 9/2/2025||
Spring Boot for example, which is arguably one of the most common ways to do Java anything these days. If you're trying to make a point, it would be considerably easier if you just said what you mean, because so far you're not making one. You could've easily looked up any of these questions.
pjmlp 9/2/2025||
Wrong again.

Spring Boot doesn't provide a serious production quality deployment without configuration.

Bare bones logging into standard out, yes.

That isn't production quality.

Production quality is telemetry logging, log rotation and zipping, forwarding logs to Kibana or Datadog dashboard.

Etheryte 9/2/2025||
This is a silly no true scotsman argument. First you don't say what you mean and then stick up your nose when no one has any idea what you're on about. Anyone is capable of making up an arbitrary set of requirements that no language nor framework fulfills. This doesn't change the fact that for most languages and frameworks, logging is a boring, solved problem. That Next.js doesn't bring that to the table is more than telling.
pjmlp 9/2/2025||
Nope my dear, you're the one insinuating that logging works out of the box in production quality deployment without any kind of additional configuration or code changes, hence please make use happy, where that is the case.

Word vomit into standard output isn't production quality.

Etheryte 9/2/2025||
It seems you might've missed functional reading class. The first thing I led with was that you need to import and initialize logging which covers both of those. You're the only one insinuating the strawmen you're arguing against. This isn't Reddit, surely you can do better.
pjmlp 9/3/2025||
I was there, initialize logging is configuration be it by code or settings files, which apparently isn't needed, an import does everything to show on production monitoring dashboards.

I do whatever I feel like, you're the one that started down this thread, don't complain where it goes.

bob1029 9/2/2025|||
Angular is absolutely not a sane framework. I'd argue it used to be, but you can't build trust in anything after being rugpulled with 4+ major breaking refactors over the years. If you get it that wrong that many times, I start to wonder what the actual purpose of the framework is.
Tade0 9/2/2025|||
Angular isn't doing bad on the backwards compatibility front. Case in point: ParamMap was introduced at some point as a successor to Params, but the people revolted, so both are available without favouring one or the other:

https://github.com/angular/angular/pull/43529#issuecomment-9...

It's kind of funny in hindsight, but at least we didn't have to modify every project just to update such a minor thing which was working already anyway.

In this regard the thing that absolutely sucks is the migration tool. Your best course of action is to update the versions manually in package.json, read the documentation on breaking changes and act accordingly.

In my view Angular was always insane, but it's becoming saner with each subsequent version. We now have typed forms (that took a while), standalone components and, most importantly, signals, which do most of the stuff RxJS is doing, but without the junior-killing hidden state and memory leaks.

pjmlp 9/2/2025||||
In consulting we don't do upgrades, we come, we deliver, and we leave, with maintenance contracts for existing deployed versions.

For an upgrade someone has to pay for it anyway, so whatever pains there are, they are reflected on project budget anyway.

More devs should do the math of work hours to money.

icedchai 9/2/2025||
This really highlights one of the main differences between "product" and "project" centric work. With a project, it's the client's problem ($$$.) Usually they'll balk at the dollars and effort required and accept the risks. Even with an outdated, obsolete framework, the actual risks are often minimal. "It's still working, right?"
Alex3917 9/2/2025||||
Really just one major breaking refactor in 13 years, and that is partly because not only have we learned a ton, but browsers themselves have changed dramatically. I'm not going to say it was perfectly handled, but they also didn't have nearly as much support from Google back then.
Klaster_1 9/2/2025||||
I kinda get what you are talking about (did those refactors too...), but which of major changes had such a high impact in your case?
kumarvvr 9/2/2025|||
> Angular is absolutely not a sane framework

I have not worked with older versions, but with V20 & signals, it has been pretty good.

doganugurlu 9/2/2025||
I’m guessing you enjoyed the nostalgia when you saw directory based path convention from the good old CGI days?
pjmlp 9/2/2025||
It is more the irony of pendulum going back and forth between generations.
tobyhinloopen 9/2/2025|
[flagged]
tomhow 9/2/2025||
Please don't post unsubstantive comments here.
balamatom 9/2/2025|||
JavaScript was made insufficiently expressive on purpose (see Eich, Sun, Scheme).

He still ended up sneaking some metaprogramming capabilities into it, though he stopped short of something recognizable like macros.

So when the highest grade vendors started taking front end extra seriously since I'd say 2008-2010, what they built basically bulldozed over the things that made JS per se tolerable. Instead, they built frameworks out of the standard imperative primitives in JS, which take things in more of a C++-inspired direction.

The "growth hack" is here, as with vaunted Apple, vertical integration. The only way to couple markup to state management to server/client flow does not amount to a framework; it amounts to no framework since the Web was not invented by VCs.

To get a framework out of it, i.e. couple developers' practical knowledge to your ecosystem (turning it from general to domain specific but fuck devs right), you also need to couple things in your stack at the wrong places, as exemplified by the already much-maligned misfeature explored in TFA.

I.e. for the onboarding flow of a hosting business to work in 2025, you first need to have been teaching bad architecture for a generation. (It's why Meteor.js didn't take.)

On the one hand, pragmatic of Vercel to exist in the long shadow of the React/TS monstrosities. On the other hand, it's just one more company whose mere existence in this world has contributed for my work and life becoming harder for no real reason, even though nobody I'm within a handshake is even their customer.

Like many, I only learned of them only when I googled, "who the hell made this horrible thing the frontend team over is now stuck with, it's 0.01xing their velocity and frying their brains besides" and, well, now they're here. I would like to remind them to try and measure their externalities.

tobyhinloopen 9/2/2025||
Is there a solution? What do you consider the least bad interactive frontend solution?
balamatom 9/3/2025||
"Frontend" is literally the integration of Web Platform APIs.

So you need (1) the knowledge of what platform APIs exist (2) the ability to reason about existing abstractions (3) the ability to define abstractions.

In modern life all three are considered unsafe things. Therefore to prevent people from entering invalid states exists The Framework: useless abstraction layer that does nothing besides be conventional. That's a common enough pattern anywhere population's above Dunbar; whether it's embodied by React or TypeScript or Windows or an entirely different order of lowest-common-denominator monoculture is immaterial.

Thankfully, software maintains an objective material component - the code, which they're trying to now turn into another wishy-washy thing you interact with using endless imprecise human language. Purely in terms of that, it remains possible to propose some ways to get a project off the ground more efficiently by virtue of dodging the toxic mainstream:

TL;DR conventional: native DOM manipulation; state management with Observable; Vite; TDD.

TL;DR forward-thinking: same but in proper static language: write in Rust, compile to WASM.

TL;DR exotic: ClojureScript or another Lispy language that compiles to JS or WASM.

Ofc, unless totally cowboying it, you also gotta be able to counteract the illusion of social proof. Ideally you want to be actively shaming people for building and normalizing bloatware. Preferably packing 1-2 yesmen worth of social proof of your own, just to get basic parity with the "best practices" in close quarters.

As always, depends on what you're building, for what purpose, and, critically, with whom... fuck all that though, the objectively bestest solution is always https://github.com/Matt-Esch/virtual-dom /s

That repo is a milestone of where history took its next wrong turn. I remember it making some waves when it dropped, and it's certainly the first VDOM implementation I saw. I considered it a good, original idea.

IIRC, React came around about that time: to take the simple and sane "VDOM" optimization, apply it judiciously (i.e. where it doesn't), and make it possible to bolt enough shit onto it (redux! teaching you to type the same thing thrice before typescript! SAGA! that one weird DB paper from '74 applied to frontends JS' half-baked half-async "generators", just to demonstrate to people that they should revere the old CS publications, and definitely not anything like read them or reason about them!)

Just so that people could hold bloody bootcamps about it, where they'd be able to weed out any junes capable of reading MDN for themselves. ("Bootcamp" is another cosmic joke like "Instagram" and "Trump". That thing where they harass people into obedience then turn them into socially sanctioned murderers? Ok checks out, let's name our programming learning experience! It's nothing if not profoundly mission-driven!)

Back in those days or a little later, I remember Vue 1 and 2 being pretty great: it somehow managed to do its thing without first having to introduce three whole new dialects of JavaScript and counting.

Overall I'm glad to be out of the frontend space for a good while now and only learning about it from the confused screaming of those still trapped there. (Oh and also Next's "static build" is a Docker container I had to cook up myself, which is a next level of ridiculous; as with VDOM, you first need to have seen the past level in order to recognize it as regress, and I presume a lot of people simply haven't had the opportunity to pursue any form of informed comparison)

(For "agentic workflows" idk -- just don't use them ffs the externalities are not remotely priced in; otherwise you'd be the exact same problem as them -- the designed-by-corporate-committee frontend DX of the past decade certainly strike me as something that'd make more sense to a statistical model than to a human mind.)

tobyhinloopen 9/3/2025|||
I don’t think you actually answered the question but I totally don’t mind because it was a fun read.

Old Vue is nice, we still have some Vue apps and they’re just running without major headaches. I do recall some distinct issues with properties introduced on objects after initiating the component not being reactive, but it has mostly been an acceptable experience

balamatom 9/4/2025||
>I don’t think you actually answered the question but I totally don’t mind because it was a fun read.

That's probably the better outcome here. If you know enough things to find what I wrote entertaining, rather than vexing, chances are you're able to pick right tools for jobs just fine.

Meanwhile treadmills are gonna treadmill; if I've got one answer to everything it's to stay off them. Mighty difficult when everyone's trying to drag you onto one.

I do recall some distinct issues with properties introduced on objects after initiating the component not being reactive

Wasn't that what they fixed using Proxy (making ES6 finally a hard requirement for anything at all)?

>Old Vue is nice, we still have some Vue apps and they’re just running without major headaches. >but it has mostly been an acceptable experience

Better than one could say about the current generation stacks. Big vibe like vendors are trying to cargocult ZIRP-associated patterns (as if those were what produced value in pre-2020s Web and totally not all the human creativity that used to be channeled into the medium before the masks started falling off.)

tobyhinloopen 9/4/2025||
> Wasn't that what they fixed using Proxy (making ES6 finally a hard requirement for anything at all)?

Maybe, but I haven't touched Vue in a long time.

> Better than one could say about the current generation stacks.

For sure. I still have some projects that use what I like to call "jQueryScript", where there's just a bunch of unprocessed (or only minified) JS files with `$("#foo").click(function() { ... })` stuff everywhere. Looking back, it wasn't all that bad.

I just wish there was a pattern that is simple, works with plain, modern JS without any big dependencies (I don't want 600 node modules installing a frontend framework, please) and is easily modular and integrates nicely with other stuff (so likely either manipulating DOM nodes directly or using WebComponents)

Out of protest, I have some smaller projects that have their GUI templates stored in `<template>` tags and manipulated with plain Javascript. Anyone that opens the code will see it and think "wtf?" and then be like "oh... uh sure". The largest one I had written was 1000s of lines of code like that, kinda like a classical MVC pattern where a view (class manipulating DOM nodes) renders a model (a JS object or class). The controller would subscribe to custom events (defined by the view), update the model and call `render()` on the view. It had a lot of small classes, which was a bit too verbose to my liking.

balamatom 9/3/2025|||
Hahaha. What post. Forgot to add (!): that I have finally transcended the agony of the frontend space, does not mean a facet of my spirit does not perpetually lurk on that threshold in half-mockery, half-still-agony. (After all, cognitive science is yet to make a pronouncement as to whether it is possible to forget TypeScript.)

Do you want to be a spirit haunting the threshold in half-agony, half-but-also-mockery? It's accomplished by the "Figuring Out How NPM Packaging Actually Works So You Can Write Proper Isomorphic Business Logic" ritual, a fell rite from the forbidden "Uncomfortable Truths About The Presentation Layer" grimoire, and one that a lot of them would be better off with you not knowing, and now you do ;-)

globnomulous 9/2/2025||
Thank you for censoring the word "shit." We try to keep Hacker News clean, for families and children.
tobyhinloopen 9/2/2025||
You’re welcome