Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If Google handles front-end JS so well, and the world is basically a customer-centric SEO game to make money - why do we even bother use server side components in Next.js?


> why do we even bother use server side components

The naive hope among some web developers is that not everything that we do on the web we do for the sole reason of SEO :-) Sometimes we do things in order to improve end user experience. Sometimes we even do things to improve website accessibility. Doing stuff either at build time or dynamically on the server allows us to send less javascript to the client for faster page loads (well, not necessarily when Next.js is involved; but still); as well as to send the prepared html to the browser, enabling progressive enhancement / graceful degradation. It also gives us full control over http status codes instead of always responding with a 200:OK. Plus relevant previews for when the url is shared in chat apps or social media.


Could you please sum up what you think nextjs adds in this context? I read your comment a few times and still can't see any value added by nextjs


IMO for most use cases it's really not needed. Clients are fast and traditional single-page applications are easy and straightforward to build.

Vercel is a hosting company, and that was never more apparent than when they enabled App Router (i.e. server-side rendering) by default way before it was actually ready for mainstream adoption.


> Clients are fast and traditional single-page applications are easy and straightforward to build.

None of that is true universally unless your target audience is corporate users with hardwired connections and high-end computers. If you measure performance, very few SPAs manage to approach the performance of a 2010 SSR app and even fewer developers spend the time to handle errors as well as the built-in browser page reloading behavior.

That’s not to say that an SPA can’t be fast or robust, only that the vast majority of developers never get around to doing it.


FYI: The Next.js App Router prerenders by default, meaning pages will be statically generated as HTML. This has been the behavior since Next.js 9 (and the Pages Router). React Server Components, despite first impression from the name, can be prerendered and do not require an always-on server to use.


Hey leerob,

Thanks for your work on Next! It's still my go-to framework for most projects.

But can I ask, please, what you think the primary advantages of RSCs and the App Router are over Pages?

Is it worth the additional complexity over Pages for most use cases? When does it make sense and when does it not?


Vercel's gotta eat somehow.


Google is not the only search engine - others may have problems with indexing CSR pages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: