Live data from Hacker News

Next.js is infuriating

blog.meca.sh

61–70 of 602 posts

Re: Next.js is infuriating

#61
post #32

They're trying to do something that's fundamentally very hard. Unifying server-side and client-side code was always going to cause confusion when the difference becomes relevant. Personally I'd rather go in the direction of having code that's explicitly server-side, explicitly client-side, or explicitly shared utilities. But you'd need more of a type-safe mentality to take that approach, and you'd probably scare off…

Your observations apply generally. Debugging "magic" frameworks is often more complex than starting with simple basics and a coherent design. As a bonus there are less dependencies, less build issues and lighter pages or binaries.

Re: Next.js is infuriating

#62
post #18
post #2

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.

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.

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.

Re: Next.js is infuriating

#63
post #14

Half these issues stem from a relative misunderstanding of exactly where the code is running. Next.js has layers upon layers upon layers due to the interplay between the browser, middleware, edge vs. node, SSR... It's an enormous amount of complexity and it really only fits under the following set of circumstances: * You sell a B2C product to a potentially global audience, so edge semantics actually help with latency…

> Otherwise, just tread the well-trod path and stick to either a react-vite SPA or something like Rails doing ordinary SSR.

Just write your SPA the grown up way. Write your APIs in a language and framework well suited to such work (pick your poison, Rails, Spring, whatever Microsoft is calling this year's .NET web technology). And write your front-end in Typescript.

There's absolutely no reason to tightly couple your front-end and backend, despite how many Javascript developers learned the word "isomorphic" in 2015.

Re: Next.js is infuriating

#64
post #14

Half these issues stem from a relative misunderstanding of exactly where the code is running. Next.js has layers upon layers upon layers due to the interplay between the browser, middleware, edge vs. node, SSR... It's an enormous amount of complexity and it really only fits under the following set of circumstances: * You sell a B2C product to a potentially global audience, so edge semantics actually help with latency…

> Half these issues stem from a relative misunderstanding of exactly where the code is running.

If I take a look at other languages, these kind of multi-threading issues are usually represented by providing a separate context or sync package (that handle mutexes and atomics) in the stdlib.

And I guess that's what's completely missing in nodejs and browser-side JS environments: An stdlib that allows to not fall into these traps, and which is kind of enforced for a better quality of downstream packages and libraries.

Re: Next.js is infuriating

#65
Recently started developing a client side web app using Angular v 20. The app is quite complex, with about 40 components many of them nested, about 7 to 8 "pages", data dashboards, multiple forms, continuously updating data from server, etc. There substantial amount of data flow in the application.

So far, the experience has been absolutely wonderful, particularly, given the context of myself as a developer in the whole process, which is,

1. I am a seasoned developer, mainly doing python stuff, back-end servers, desktop applications, data applications, etc. Very little exposure to front-end tech.

2. I keep myself updated with the concepts, patterns & architecture of front-end systems, because I am extremely into design and good UI.

3. I am at a stage where I can do basic web apps with Vue, React, Angular & vanilla HTML and JS.

With Angular Signals and concept of Stores, Services and Dependency Injection, I am able to handle data flow very easily, am able to add features to the app in a consistent manner, able to debug and trace errors with relative ease.

I have earlier read NextJS docs, Remix Docs and read tutorials about developing react apps using Vite. It has always been a confusing maze of stuff. Perhaps I am getting old (about to touch 40), but I have been programming for about 25 years now and I was able to carve out the architecture I want in an Angular app with ease.

Also, this app is going to be a production app, and is critical for my work, so its an impactful decision, which, thankfully, I have been happy and pleasantly surprised with.

It could be that I could have chosen React, and end up with the same thing, but, somehow, in the extensive tech stack selection process that I took up before committing to Angular (which involved testing out core mechanisms of the application in React, Vue & Angular), I felt very much at home with Angular way of things.

Re: Next.js is infuriating

#66
post #5

Heard and appreciate the feedback. We’re well aware of the DX papercuts in Middleware. With 15.5 we made a big step in supporting Node runtime[1] which addresses a slew of issues people have reported over time. If I went back in time, I would have called it Routing Middleware or Routing Handler. A specific hook to intercept during the routing phase, which can be delivered to the CDN edge for specialized providers. It…

Since you're here — I'll just pipe in.

Here in this article, the author, failing to comprehend the domain differences, is applying the same approach to call a function everywhere. Of course it won't work.

The fallacy of nextjs is attempting to blend function domains that are inherently different. Stop doing that and you will be fine. Documentation won't work, it will be just more confusing. Blending edge and ssr and node and client-side into one is a mess, and the attempt to achieve that only results in layers upon layers of redundant framework complexity.

Re: Next.js is infuriating

#67
post #19

Earlier quoted context omitted.

Like said in the article, most other JS frameworks are actually pretty good these days.

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!

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).

Re: Next.js is infuriating

#69
Next.js is indeed not very open for feedback. Next.js is also opinionated. So if you are using Next.js, you can use what they have and do it their way. If there is something, just wait...

For me, it isn't a framework I want to use in any production environment. Your system is too much depending on something you have no influence on. Like in your own code, it is good to decouple, don't make things depend too much on something, not in your own code, but also on external code like frameworks and libraries.

That is why I prefer to build things like I can (kind of) easy drop my dependencies, for what reason, and use something else, or build it in my own codebase. If some framework doesn't allow it, and you have to work it their way, and is the base of everything, that should be a big red flag.

Re: Next.js is infuriating

#70
post #19

Earlier quoted context omitted.

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!

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…

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.
Post reply on HN