107 points · by creativedg · 3y ago · 152 comments
I'm having a difficult time not being salty about this entire situation. There are basic production requirements that haven't been addressed for years because their hosting platform provides it. You don't like the way they do logging? Sounds like you need an attitude adjustment.
Vercels devrel is by far the best thing that they do, miles ahead of their engineering.
Really though, it's not true that "everyone is using nextjs", so it's not "the meta" anyhow. I think most developers can safely ignore it
I don't want to counter their point just for the sake of countering it but if a person's only supporting argument for using a tool is "everyone uses it" there isn't much of an argument to be had in the first place.
It's not an option for large next.js projects, and certainly does not convey what you're saying here.
I get that you are building all these new cool features, but that cannot put basic functionality and backwards compatibility at risk. Radio buttons have been around forever, I'd assume that they are being used by tons of websites all ove the place. Yet hydration of SSR radio buttons was not being done properly and so you could not set a default value for your radio button...
This kinda shit is just basic. You can't add new features at the expense of basic functionality.
If you can link the issue with a reproduction, I’m happy to look into it.
Lately, it seems like most issues aren't even being acknowledged. It's pretty frustrating to encounter a bug in a documented use case, spend hours trying to fix it, realize it's a Next issue that was filed months ago but has yet to receive a response from Vercel, or to have reproduced and explained the issue and be ignored for months and counting.
The issue count at Next is huge, and I'm sure overwhelming, but if you're going to hype "stable" features that are beta at best, there ought to be some measure of support (or at least acknowledgment) for when they don't work.
People invest their livelihoods in these frameworks, and false claims are damaging. I'm currently knee deep in a project that can't budget a rewrite, so I'm just hoping someone at some point notices these issues and they get fixed. Not great. I've yet to encounter a project that calls features "stable" as carelessly as Next does. I've never felt so burned by open-source marketing.
If I was starting a new project today, I would stay away from Next.
Could you share the issues you're running into? While there's going to continue to be bugs and things to improve in the framework (it will never be "perfect" or "done"), that does not mean that it's not stable. We mentioned in our conference keynote today that 8,000 of the top 1 million sites on the web are now using the App Router in production.
Regardless, we want to keep improving. It sounds like you have had issues with the Pages Router specifically, and not the App Router, as you mentioned budgeting a rewrite. Is that correct?
The issues I'm experiencing are for the App Router. Namely, and to keep things reasonable scoped, with parallel routes. These are being recommended for common use cases, but a lot of things are broken along their way (along with intercepting routes)... I'd recommend searching issues for the full breadth, but here are a few that jump to mind:
Server actions don't work in parallel routes unless that route was hard navigated: https://github.com/vercel/next.js/issues/54173
Parallel routes don't unmount if navigated from with anything other than router.back()... this might be a documentation issue, as I recently got this to work as expected in one case with a null page.js at the root of the parallel route: https://github.com/vercel/next.js/issues/49662
CSS Modules don't work on hard navigation... entire paths render unstyled: https://github.com/vercel/next.js/issues/52245 https://github.com/vercel/next.js/issues/56524
Speaking of CSS Modules, they import multiple times in indeterminate order. This breaks precedence and the cascade, making styles indeterminate. There are hacks that mitigate this, but even with the hacks it causes problems: https://github.com/vercel/next.js/issues/51030
These aren't exactly edge cases, and to get at the heart of my complaint, they haven't been acknowledged, or haven't been followed up on for months, despite being marked stable. I don't mean to suggest that you all aren't doing the best you can, and I certainly don't mean to suggest that you can do better technically, but as a user it's concerning to get in deep and continually run into beta issues on what's meant to be stable, and be in the dark as to when they'll get resolved, much less if the team is even aware of them.
I'd posit that Next has a ton of users, and a ton of issues, because it prematurely marks features as stable, and then markets them aggressively. Instead of working through these issues in beta with a manageable number of early adopters with aligned expectations, Next gets more than they can handle, frustrated that features sold as production ready are not. This, to me, is a questionable business strategy, not a sound technical one.
I'm fascinated by this. Literally, in every other HN thread in existence, you find stadiums of people shouting that they hate slow-loading SPA pages, and that all the work should have been done on the server, as God intended. Only on the release of Next.js 14, of all things, do you find people saying that actually SPAs are great and SSR is a regression!
People are complaining about server components and the machinery to enable them: but those are actually unrelated to SSR.
Client components are rendered on the server.
-
SSR was the sane middleground that worked since Next.js 1.0: You generated some content, and the frontend had all the Javascript and used that content to give a snappier SEO friendly experience.
Next then turned around and convinced everyone that this wasn't good enough, and you actually want to try and have the server take chunks out of the Javascript your frontend has so that a bunch of metrics that they inflated the performance of would improve.
For people with medium and high end devices, SPAs are mostly fine. For those with low end devices (which is a large part of the world), SPAs sometimes don't work well and this is true of many UI frameworks.
Real human beings benefit with you ship less code. And, if people are paying for data, which a lot of people still do, this matters.
SSR has been doing just fine for the last 25 years, now we have to put up with Next.js, due to the ongoing partner agreements Vercel has been doing to push Next.js as the only framework in MACH products.
Literally every other HN thread I see has at least handful of people pushing Astro.
I'm not disagreeing with this actually - but I've also never been a massive fan on SSR for React. In addition - NextJS goes further in inhibiting React functionality - for instance: useLayoutEffect doesn't work at all.
With everything else being DIY integration, and lesser tooling.
EDIT: Honestly a web components framework with 1-to-1 likeness in API would be first class. I'd jump immediately.
I'm sorry if this sounds too dark or unwarranted, but this playbook is too old to be dismissed.
I gotta admit that its been liberating working outside the javascript/react realm. Using Go + HTMX + [insert tool here] has been a fairly easy transition. Is it a 1:1 replacement? No. Does it solve most of my use cases whilst providing a better developer experience? Absolutely.
I'm not trying to hate on React here. I just think its time to stop and ask ourselves "is this REALLY the best idea/tool for xyz?".
NextJS 13.4+ is nothing short of incredible. Are you telling me I can get a free, faster, opinionated, React implementation with 10's of finicky/unreliable/3rd-party Node_Module dependencies now seamlessly baked in for free? With a unified/simple build process too?
NextJS is nothing short of a lifesaver for small/indie web dev teams!
I do have my struggles + bloat + bugs using AWS instead of Vercel to host, no doubt, but that's out of my own cheapness/stubbornness. Vercel is not a charity, its a business -- I'm disappointed by commenters here basically complaining they don't "work for free".
This version also includes stability for Server Actions, which includes a hook useOptimistic for optimistic updates.
I agree the offline story isn’t great today and we could do better there.
I understand the need as a business to address more use cases that buys servers. But as a current user, upgrading to a new nextjs has been mostly painful and unrewarding.
This is the broad consensus among everyone else I know using Next - they felt like the Next 13 release and the app router was a rug pull from a previously pleasant experience.
And whenever you complain about this or ask for support, some devrel guy from Vercel shows up in your replies, saying something to the effect of "Wow! That's crazy, we worked really hard on Next 13! This is my first time hearing about this!"
Edit: Since I know the devrel guys are in this thread: If you want people to keep using Next, something fundamental about how you guys write the framework needs to change. The instability and lack of documentation makes developing with your framework a massive pain in the ass - anyone I know who can is migrating off it as quickly as possible.
I’ll be the first to say the launch of the App Router could have been smoother. Definitely not the first time I’ve heard the feedback. I’m optimistic Next.js 14 is a step in the right direction based on this.
What do you feel is undocumented? I’ll get that added.
Let us take control when self-hosting, please!
For my projects localisation is a necessity. I tried both i18n and next-intl and found them both lacking in functionality, buggy and missing documentation. This should just be part of the framework or at least have a tighter integration.
The same story with next-auth.js, which confusingly still exists while promoting https://authjs.dev/. For the most basic implementation it probably works, but the app router documentation is spliced into the normal documentation which creates a whole lot of ambiguity.
There's been a lot of discussion surrounding caching for Next.js 13 as well. I personally find it confusing and the behaviour described in the documentation regarding revalidateTag/revalidatePath and client-side caching does not match my real world experience. I would love some more documentation regarding user-specific caching as well, for instance with personalised user dashboards.
It feels a bit ridiculous to release Next.js 14 today as we're still getting used to Next.js 13. And though there might not be any big/breaking changes it creates a feeling where Vercel is racing forward without keeping other library maintainers or its users in mind.
I guess it had to be ready for the Next.js Conf event.
i18n was part of the framework in the Pages Router, but it was limiting. We heard a lot of feedback that folks wanted better access to the raw primitives versus an opinionated i18n setup. So now you have full flexibility when using Middleware https://nextjs.org/docs/app/building-your-application/routin....
NextAuth.js just released a new beta version with full support for all App Router features, including Server Actions. It's what we're using in the official Next.js Learn course that teaches authentication https://nextjs.org/learn.
We mentioned this in the keynote today at Next.js Conf, but it wasnt in the Next.js 14 post, but next we're working on simplifying caching. We do now have extensive documentation on caching, but it kind of highlights that it's a bit much right now https://nextjs.org/docs/app/building-your-application/cachin....
Next.js 14 doesn't have new APIs to learn, so if you're learning Next.js 13 (which I believe you're referring to the App Router model), nothing changes. The major version is for semver, because there's a few small breaking changes like bumping the Node.js minimum version. We have some codemods https://nextjs.org/docs/app/building-your-application/upgrad....
plugin for i18next: https://inlang.com/m/3i8bor92/plugin-inlang-i18next paraglide (i18n library): https://inlang.com/m/gerre34r/library-inlang-paraglideJs
Someone else in these comments mentioned:
- Fuck spending 3 hours working out why you’re not able to use relative image paths in MDX files and have to shove everything in /public.
- Fuck fighting five layers of configuration and bundlers and libraries and GitHub issues to try and load a WASM file without having the whole thing break.
These were both issues we had to deal with, and similarly lost many hours to trying to resolve.
At one point you guys seemed to have shipped a release that, for some large fraction of users, caused the devserver to start OOMing rapidly. When this started happening to me, I spent about a day trying to debug it, since I assumed that such an a huge and imminent issue would arise from my mistake, not the web framework's. I eventually texted a friend of mine about the problem, only for him to tell me that they had been having the same issue, and linked to this thread.
https://github.com/vercel/next.js/issues/54708
Working with a web framework that's so unstable that fundamental features like the devserver break periodically isn't fun. I stop trusting the web framework, and when a bug arises I find myself having to check both my own code and Next's. Now this applies to some degree with any open source framework, of course - there's bugs in everything. But I have so little trust for Next at this point. We've collectively lost weeks of eng hours to just dealing with quirks of Next.
Right now we're really affected by the fact that the recommended way to cache database connection objects is broken in our repo (and some other users' repos, evidently).
https://github.com/vercel/next.js/issues/47099
This is another example of something where I naively assumed that the error was on my end, and spent days trying to debug our database configuration, hosting provider, etc, before realizing that at some point something broke and the recommended way of persisting these connections on the global object doesn't work anymore. What's the point of using a framework if I have to question whether it's working correctly every time an error arises?
There might be a point where app router is stable & smooth but it's pretty clearly not right now, so havn't really seen the need to upgrade. I think there was a pretty decent comms issue with the stability of it from both the Next and React teams, but I have a hard time faulting an otherwise fairly stable and useful framework for adding features when they're not breaking the existing stable path.
Hooks was a bit of a bumpy transition as well, but I do think that I prefer the code written with them to the code before them. I think it's OK to wait a year or two to let the rough edges get filed down when these types of frameworks release big new feature sets.
Edit: I'll note that we don't use next/image or API routes either, both of which I've seen some churn / pain with. Possible I just hit on the framework when it was in a pretty happy place and most of the new features or suggested defaults have had pain points that I havn't experienced.
If you're not you stick with pages router and get ready to fork as soon as they drop it. (Just don't ask when that will be https://www.reddit.com/r/reactjs/comments/156m504/comment/jt...)
_
Edit since I got rate limited: DevRel at Vercel replied to this trying to spin Remix not supporting RSC as a differentiator.
It doesn't support RSC because you guys managed to ship a flawed standard under the React brand and they rejected it.
It's the value proposition of RSC without the broken standard (and better performance)
Your reply is like saying an EV isn't environmentally friendly because it doesn't support E85 gasoline and yours does.
For example, `getServerSideProps` in Next.js is the same as a `loader` in Remix.
Otherwise they might also be looking at Nuxt, Sveltekit or Solidstart, but if they're switching top-level frameworks they may as well use Astro because they can mix and match React/Vue/Svelte/Solid
On the other hand, it seems like a lot of folks (particularly in this thread), think of Next.js as a well-intentioned, but unstable shiny toy that more or less breaks when you try to do more complicated stuff. Is that accurate? If so, what is the standard stack that most companies are using these days to build high quality web apps?
I dont see many real technology companies running these stacks, more so barely funded startups
Next.js is a framework built on top of React. It has a more defined structure for things like routing, and it provides useful tools for server-side rendering. It is definitely used in production by major companies and not just by "barely funded startups."
Vercel makes Next, among other popular JS and serverless offerings, and they offer various managed hosting services. I don't use Vercel's paid offerings, but they strike me as operating in the Heroku space, where they make it easy to get a simple app off the ground.
https://nextjs.org/blog/next-13
PS: I’m not sure why hyperfurism’s reply was downvoted to oblivion. They were correct.
I haven't really worked on small-ish scale things until starting to work on my startup.
I've always depended on managed postgres, and I use Go for all my services. I don't really have any experience using things like Vercel that combine UI + some kind of backend.
Are these technologies meant for use on "large" platforms or are they mainly targeted towards small / hobby SaaS? Would love to know more!
Basically rather than making your DB calls directly in NextJS server side code, you can make an HTTP call to your API written in Go or whatever. This is how I've used Next for years and it makes a lot of sense. One common API for the website and mobile app. NextJS just becomes another consumer of the API. It does feel a little bit funny that your server-side code is calling your API, but think about any large tech company where there are layers upon layers of APIs that every request is flowing through.
So much pain could fly away instantly.
It's a paradigm shift compared to the old way of thinking about React apps
In my company we've been using Next.js in production for a long time now and for us the app router has been key to increasing DX
Server actions seems like a neat idea. Probably does nothing for large projects, but at least IMO it can be very useful for the smaller use cases.
This blog article is absolutely bloated, and a huge problem I see with JS frameworks.
87 requests 2.9 MB transferred 23.2 MB resources
Fuck 1MB of JS to render a static HTML page.
Fuck the image component, and not being able to optimise your image unless you use their cloud service for no reason at all.
Fuck spending 3 hours working out why you’re not able to use relative image paths in MDX files and have to shove everything in /public.
Fuck fighting five layers of configuration and bundlers and libraries and GitHub issues to try and load a WASM file without having the whole thing break.
Fuck some half-assed play at being a static site generator and a backend framework, that conveniently works best on your overpriced cloud service.
Use Astro. It’s what next.js pretends to be
This is gold level comedy. I am not sure how no one in the tech industry is seeing this.
It accomplishes nothing and obscures the sign posts that would help the next developer that encounters the same issue.
Environment variables stopped working: https://github.com/vercel/next.js/issues/53367
The <Image> component stopped working: https://github.com/vercel/next.js/issues/53715
(Both of these were, afaik, exclusive to self-hosting, rather than running on Vercel)
Funny, trying to open the post's link (https://nextjs.org/blog/next-14) with JS disabled, it renders a "beautiful" blank page.
I recently tried to rebuild my Jekyll blog with Nextjs. This felt way too hard for something that was basically a nunch of static pages, but I pushed through and ignored that feeling.
This, though? It's confirmation that my type of use case wasn't a priority for this library.
https://vercel.com/blog/vercel-welcomes-rich-harris-creator-...
From the same link above: >> "Joining Vercel enables Rich to work on Svelte full-time, giving the project its first dedicated contributor. The governance of Svelte does not and will not change – it's still the same independent, open-source project and community. With Vercel's backing, Svelte can get even more ambitious."
"and why"?! Staggering levels of negligence there.
The default bundle size is also nowhere near 1MB. Next 13 and server components entire point is to reduce the bundle size by not shipping JS that is only ever called on the server.
I.e everything that’s done here[1]
Oh no. You can’t. You need to set “images.unoptimized = true” and be happy about it if you’re not using a cloud image service.
https://nextjs.org/docs/app/api-reference/components/image#l...
Man this took me on a wild ride once.
It allows you to build full-SSR apps with Tailwind and JSX, has support for SQLite and HTMX, and is in general a great return to how web dev used to be / should be.
So you end up having to use Next.js if not in the mood to use less capable integrations, and then eventually end up deploying the application in Vercel infrastructure.
use hyperwave. https://github.com/tireymorris/hyperwave
It allows you to build full-SSR apps with Tailwind and JSX, has support for SQLite and HTMX, and is in general a great return to how web dev used to be / should be.