top | item 45607469

(no title)

mati365 | 4 months ago

I'm not so sure Next.js is as SEO-friendly as people claim. The JavaScript bundles are pretty heavy, and the page still needs to hydrate before it becomes fully interactive. There are attempts to speed this up with React Server Components, but the developer experience there is already worse than with Phoenix components.

Next.js server performance isn’t great either - honestly, it’s pretty bad. Pages don’t feel that fast for users despite all the tricks and optimizations. In my opinion, metrics like LCP and others are much easier to optimize in older, more traditional frameworks. Unless you’re building a full-blown web application, a classic web page will almost always be faster and simpler to deliver without all the Next.js complexity.

discuss

order

tracker1|4 months ago

I think if you're going to push closer to the server in a client+server app, I'd probably look towards either HTMX integration options with a preferred backend (there's some cool C# integrations from Jetbrains as an example) or Astro over Next.js ...

That said, I'm not necessarily a big fan of mixed environments since IMO most web apps can be mostly client side and most websites can be mostly server driven. Either is simpler than the mingling tends to get. That's just my take though.

crowcroft|4 months ago

I don't understand the 'Nextjs is good for SEO' hype. I think it's better to frame it as Nextjs isn't bad for SEO. Whether a site loads without client side rendering is a pretty binary thing.

If you're using Nextjs to get a high level of rich interactivity then your SEO issues aren't about CSR vs SSR anyway though. As you point it it's just bundle size and site speed, and URL structure that end up causing a negative impact. Nextjs doesn't fix that.

rustystump|4 months ago

Next is all about that server rendering for seo which i remember doing for a spa wedding website a decade ago. Eg, if a crawler, server render otherwise spa style.

Nextjs with pages router was pretty good for me but app router is where it got complicated