Next.js is the most frustrating, opinionated mess I've ever had to deal with
twitter.com
twitter.com
Next.js fixes quite a few of the initial problems with using React even though there's still some stupid and even some new stupid introduced.
I'm definitely building in Next.js now, not vanilla React.
I think the problem is that SPAs are limited in use, but a lot of devs ONLY build SPAs and that creates a mess. Before Next.js, if I was building anything other than an SPA, I'd really have to wrestle with if I should build it in MVC or React...because it was a lot more trouble in React to do it well. But I don't have that problem with Next.js.
I suspect that people struggling to work with Next.js from React don't have the experience of web app development before React existed, so suddenly they are faced with the same learning curve of people who had to figure out React when they were used to full-stack development.
I'm not actually sure what the value of the app router is, but the page router works well and is more mature.
I am lead on an enterprise Angular project and among the reasons I went for it was due to the fact is is opinionated, but is doesn't get in your way. We're on Angular 16 now with a C# back-end and everyhing is going well, is logical, and performant.
Prior to this I was fully in the Microsoft ecosystesm, from ASP classic, through ASP.Net Web Forms, and through MVC.
This was the first project I decided to use a SPA front-end with, wanting to avoid Microsoft's latest Blazor push. It was too early to risk it.
SPAs have their place, and this is a large and complex system.
I agree that React is overused, it seems like it's the "go to" for many people, such as people who are either self-taught or went to a React-focused bootcamp. I've seen plenty of React sites that could be static HTML ... some of them could probably even get away with no JS.
Forcing NextJs to do something it's not meant to do (which I spent months doing last year) is not fun and leads to frustrating and wheel spinning, but doing what it's supposed to do I feel like I can spin up something so fast and easily and deploy to Vercel quickly and have a full web app in no time that has amazing speed. I wish they had a tier above pro, but below enterprise though for those who make a living off using it, but can't justify $1000/month just so someone will answer a phone call or email as to why their platform is failing with no errors and now you can't earn a living.
They messed up launching the app structure when it wasn't fully functional but I'm under no obligation to use it.
It seemed to me when I did check it out that'd I'd probably want to stick with the more battle tested next style though.
Vanilla React, for one. When it came out, it was way less opinionated than Angular, being only a UI lib and not a full framework per se. But people kept trying to use it like a full framework, and ended up creating things like React Router and Redux and a bazillion other routing and state and SSR etc. solutions. It was a nightmare. React apps from that era are totally unreadable and hard to reason about.
It wasn't until Next that a React project could actually feel sane and organized, with sensible defaults controlled by one party instead of a million overwhelming packages from twenty different companies you'd have to mix and match.
Especially when used with Vercel, I agree, it's quite astonishing how much better it is than the stuff we lived with the last two decades.
Hell, even the official React docs now recommend using Next instead of Vanilla. That's how much better of an improvement it is...
Their official documentation for early loading scripts simply doesn’t work.
https://github.com/vercel/next.js/issues/51242
Did any of this stuff get tested at all before being labeled production ready?
I haven’t worked with it myself but at minimum I’d expect it’ll improve workflows where there’s clearly a need for breaking up server work and interleaving it with client rendering, because the server split is wherever you choose rather than at the top of your render tree
Yes, it genuinely is a mess where people are continually reinventing the same things again and again on a loop and no two projects are the same, almost none of them are by the very nature of being React particularly well aligned with web platform standards and have major parts of their ecosystem captured by weird VC companies who don’t have the same priorities as your developers let alone your organisation.
That’s not particularly true for say Angular or jQuery or Web Components etc.
Long live vanilla js, jQuery or whatever else that gets you shipping faster.