Meta: this has been bugging me for ages as I see it becoming more and more common (I think it’s over half of such “Show HN” sites with their own domains now that are blank for me, a JavaScript-disabler-by-default mostly for performance), but I’ve never asked anyone; why do you use Next.js for the marketing website, rather than just writing HTML? As it stands, the page is blank if one doesn’t execute JavaScript, and it’s executing almost a megabyte of JavaScript where as far as I can tell the only thing it’s doing that straight HTML with no JavaScript couldn’t do is the spinning globe. This just seems like a terrible fit for client-side rendering, unambiguously worse for the client (slower to load, less reliable, and excluding various users and bots—even Googlebot doesn’t always execute JavaScript, only after a while in general, I think), and I wouldn’t have thought that it would be any easier for the developers. So I’m curious: firstly, am I missing something and the use of Next.js actually does make life much easier for the developers, even for what should be simple HTML like this? And secondly, is there some reason why almost no one seems to be enabling server-side rendering or generation when they use Next.js like this? (I thought those features were a key part of why people would choose Next.js, and would have assumed from what I had heard that SSR would be enabled by default, but maybe not?)
(Personal context: plenty of web frontend and backend experience, but no React, as I’ve favoured lighter things, such as Svelte for the last few years; and I tend to just write straight HTML, possibly with simple templating. I’m not seeking to criticise or condemn here, just to understand. I understand why you’d depend on JS for web apps, just not for simple marketing sites.)
I definitely think Next.js is a great option for such websites. The main reason is that it can do static site generation with React, as well as SSR. It's really simple to set up, and very flexible.
It means you can build quickly and even if you start static, you can later add more functionality, go SSR, or even build out a full on web app without actually migrating or rewriting.
People have opinions about React, I will not go into that too much, but personally I find it a very effective and enjoyable tool to build things with.
Imo something like Next.js is easier to develop with than "just HTML" as you get templating, hot reloading in development, routing, image optimization, i18n options, and all the other goodies that come with it, or are already solved by someone. It's imo not to be underestimated how much work all the little things are when you have to do them manually.
That said, I have to agree that it's strange not to enable SSR and not to make a static export, I think it's pretty much the default. I find the export functionality one of the best things about Next.js as it makes sites blazing fast and really easy to host.
With next.js you don't need to build 2 projects if you want a landing page + your actual app. You can have routes with no JavaScript if you're not fetching data. I think it basically comes down to simplicity for the developer.
But seriously this is not just a privacy thing. It's also an accessibility problem. Why is it that we have lost the art of just making a web page that does stuff, and then enhancing that functionality?
(Personal context: plenty of web frontend and backend experience, but no React, as I’ve favoured lighter things, such as Svelte for the last few years; and I tend to just write straight HTML, possibly with simple templating. I’m not seeking to criticise or condemn here, just to understand. I understand why you’d depend on JS for web apps, just not for simple marketing sites.)