Live data from Hacker News

Next.js is infuriating

blog.meca.sh

51–60 of 602 posts

Re: Next.js is infuriating

#51
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?

Re: Next.js is infuriating

#52
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…

As mentioned somewhere else, these are the kinds of layers SSR frameworks have had for decades, maybe people should learn not to do SPAs for everything.

Re: Next.js is infuriating

#53
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…

If you finally decided to support proper server-side middleware, why is there still a limitation for only one middleware function and not a chain of middleewares as every other sane server implementation offers?

Consider middleware.ts as a root middleware. Nothing is stopping you from creating your own chain (which is trivial) in there. I mean, that would eventually work the same if nextjs implemented that feature — there would be a root somewhere.

Re: Next.js is infuriating

#54

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.

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.

Re: Next.js is infuriating

#55
Deno Fresh seems like it has the right approach. It’s not complicated, the docs are refreshingly simple, and it handles both server and client logic without getting confused.

It’s just a shame it’s Deno-only (although I completely understand why)

Re: Next.js is infuriating

#56
I had it uninstalled when they messed with the fetch prototype which resulted in our team wasting days to find the actual reason file uploads above 100kbs failed.

Imho next attempts to do too much, moves too fast, every few months the wheel gets reinvented and never perfected.

Re: Next.js is infuriating

#57

It really is. I am a staunch react defender, I work with it daily and I found the change from class components to hooks to be a better programming model. But whenever I work with Next, I feel like we lost the plot somewhere. I try a lot of frameworks and I like esoteric programming languages, but somehow Next.js, the frontier JavaScript framework embraced by React is the only experience where half the time, I have no…

Next has enshittifed themselves some time ago. Everything that goes through the VC cycle does that eventually.

I am happy for them and their money, but I can't use this anymore. I take Vite as the default option now, but I would prefer something more lightweight.

Re: Next.js is infuriating

#58
> SvelteKit is a Vercel product

While Vercel acqui-hired many developers behind SvelteKit and Nuxt.js, I was under the impression that they weren't interested in running these projects hands-on, or even making them similar to each other. Can anyone correct me here or explain what their long-term game seems to be?

Re: Next.js is infuriating

#59
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…

I wouldn't say I agree with those circumstances, but even if they did indicate a match with Next.js, they are not worth the reduction in productivity and maintainability that comes with it.

I use Gleam's Lustre and am not looking back. Elm's founder had a really good case study keynote that Next.js is basically the opposite of:

https://www.youtube.com/watch?v=sl1UQXgtepE

Re: Next.js is infuriating

#60

As much as I don't like most things about nextjs (I could write a vastly larger blogpost about it but won't as I like to keep my heartrate down), it feels like claude was trained specifically for it. In our experience, claude code is better at nextjs than other frameworks.

That seems like the most unfortunate of reasons to choose it as a framework for new projects, though. I hope that doesn't become the deciding factor in the future.
Post reply on HN