There are two kinds of rendering that take place on the server: “static page generation” and “server-side rendering”. With static page generation, the server compiles the files for the page once, and stores the resulting static files in a CDN. These can quickly be accessed by a user from the server, because the files are now static assets that do not need work done on them by the server. Server-side rendering is used for dynamic pages, that have data that updates or changes. In this case, the page is rendered on the server each time a user requests the page. this way the files are always up-to-date, albeit taking a longer time to load for the user.
Next.js is a fascinating technology that combines the benefits of server-side and client-side rendering. There are several confusing concepts, but after thinking about them for a while they make more sense. ? Happy coding!