Member-only story
The Hybrid
I was very satisfied with the development experience provided by React + Go + PostgreSQL: scalable applications, written with clarity and readability, whose content can be updated without a visible reload in the browser. The dream of any full-stack. However, the stack in question has an issue: it generates programmes that are not indexed by Google, Bing, Yahoo, DuckDuckGo, etc.
So, at the end of last month, I got to work and rewrote the application, this time using the Next framework with support for Server Side Rendering, aiming to provide a reasonable solution to the problem of search engine presence. It took me barely one or two weeks. Most of the code I had written earlier could be reused because Next is based on React. Changes?
Well, Next’s routing is based on the organisation of folders within the app directory, pages rendered on the client-side require a "use client" at the first line of code, parametrized dynamic server-side pages — when they are not updated too often — need a function called generateStaticParams() which is used to prerender their content every revalidate seconds, and finally — but not least — the application is served through Node:
import express, { Request, Response } from "express";
import next from "next";
const app = next();
const handle = app.getRequestHandler();
app.prepare().then(() => {
const server = express()…










