Live data from Hacker News

Next.js is infuriating

blog.meca.sh

101–110 of 602 posts

Re: Next.js is infuriating

#102

AsyncLocalStorage.enterWith is the wrong method; .enterWith changes the logger for across the *synchronous* execution. This doesn't matter if there's only one request happening at time-- like when you're testing locally. But that's why it didn't work on the actual project. Use .run. return LoggerStorage.run(requestLogger(), () => { logger()?.debug({ url: request.url }, "Started processing request!"); return NextRespo…

Nope, this doesn't work either.

Re: Next.js is infuriating

#103

Remix ( cough react router 7 framework mode cough ) is like the polar opposite of this, it's just a Request -> Response handler that you have to build your server around manually. Which I found kind of annoying at first but it does give you the freedom to do what you want.

I have been frustrated with Next.js changing it's API so much in the last few years and making things more and more complex and confusing. I am wondering about giving Remix a whirl for an upcoming forum/CMS rewrite with custom auth. Anybody else have experiences with Remix?

I used it with Shopify's hydrogen framework. Wasn't a huge fan of hydrogen but Remix works fine, it mostly just got out of my way and worked. Dependency injection was trivial :)

Re: Next.js is infuriating

#104

I was about to start a new project with Next.js... is anyone willing to give me some advice? I'm about to start building an e-commerce site (30-50k poster print designs, i.e. no inventory), and was leaning towards a Django backend (because I know it) and... some sort of SSR frontend. I'm not really a frontend guy, but taking this as an opportunity to learn it. This article obviously does not inspire confidence in me…

Vanilla Django would get my vote. Your description doesn’t sound like it needs a heavy frontend. Sprinkle in some scripts as needed. If you really want to learn front-end, Next is really just the worst place to start or finish or anything in between.

Re: Next.js is infuriating

#105
post #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 an…

what do you mean? Shopify is the largest eCommerce platform and runs rails.

Re: Next.js is infuriating

#107

I 100% agree. I've ran into the same issues, and I would never use Next.js for anything, and I will encourage every team at work to use something else. In general Next.js has so many layers of abstraction that 99.9999% of projects don't need. And the ones that do are probably better off building a bespoke solution from lower level parts. Next.js is easily the worst technology I've ever used.

Many of the abstractions and nextjs tools do things that my OS does better, cleaner and more predictable too.

I suppose the overly complicated ENV/.env loading hierarchy is (partly) needed because Windows doesn't (didn't?) have ENV vars. Same for inotify, port detection, thread management: *nix does it well, consistent ish. But when you want an interface or feature that works on both *nix and windows, in the same way, you'll end up with next.js alike piles of reinvented wheels and abstractions (that in the end are always leaking anyway)

Re: Next.js is infuriating

#109

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.

Yes, we try not to do that. But I know very many people do.

Re: Next.js is infuriating

#110
post #54

Earlier quoted context omitted.

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 an…

what do you mean? Shopify is the largest eCommerce platform and runs rails.

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