4 ms·
Tell me about it. Some of my colleagues are pushing hard for it. It seems like nice tech, but when you build an enterprise web app behind a login page, I see n
by koonsolo 5y ago
Tell me about it.
Some of my colleagues are pushing hard for it. It seems like nice tech, but when you build an enterprise web app behind a login page, I see no need for server side rendering.
Our users open up the app in the morning, work on it a whole day, and do the same thing the next day.
I absolutely see no point in trying to optimize this with server side rendering.
But it seems some front-enders want to use the latest best thing, even when it's not really necessary.
But what do you do? Do you make these developers unhappy because they are not using the latest cool thing, or do you make them happy but end up with an inferior solution?
Oh boy, these youngsters... ;)
- midrus 5y agoYou hire non hipsters.
- lucis 5y ago"Next.js has two forms of pre-rendering: Static Generation and Server-side Rendering. The difference is in when it generates the HTML for a page." https://nextjs.org/docs/basic-features/pages https://nextjs.org/docs/basic-features/pages
- koonsolo 5y agoYeah, so why would you need a custom web server when you do CSR? Edit: next.js is a web server, right? Because how else can it do SSR?
- louissm_it 5y agoWhy would you need a custom web server to run Next.js in CSR mode? Edit: Unintentional sarcastic reply from my side, it was a good question.
- louissm_it 5y agoI'd argue most Next sites use only client side rendering.
- koonsolo 5y agoSo using the export function? Or do they still run the next.js server without having the real benefit of it? In other words: what is the benefit of next.js when you only do CSR?
- crooked-v 5y agoIt's easier, faster, and has more default features than setting up Webpack by yourself.
- louissm_it 5y agoGreat question! If you're interested, I'd recommend reading up a bit on all the different rendering and deployment modes Next offers with and without Vercel/Netlify. If you use Next.js only for CSR, as I'm sure most people do, the benefits are great defaults, easy upgrades, fantastic routing, page prefetching, and easy upgrading to any of the other rendering modes if you ever need them. You don't run any kind of server if you just use CSR - you bundle your code and push it to anywhere you'd push your normal React SPA (CDN, Vercel, Netlify, etc). I you decide you need to server side render or pre render a page, you can of course run a full node server - but the far easier route is to use the Vercel/Netlify lambda functions(which work out of the box with Next). I find thinking of Next pages as separate little apps composing the same layout component to be far more maintainable than the more traditional SPA single layout swapping the contents to simulate a page transition.
- lucasmullens 5y agoYou can disable SSR and still use Next.js. Most people don't use Next.js because of SSR, they use it because it's easy to use and has an amazing developer environment. SSR works out of the box usually so it's a nice perk. If you're using React, Next.js is a pretty excellent choice for pretty much any website. Appeal to Tradition is just as much a logical fallacy as Appeal to Novelty.