How Does Server-Side Rendering Work?
So, server-side rendering helps with SEO and performance. That’s great, but how does it work exactly?
Server-side rendering is the process of rendering every possible page of your application on the server. With each request, the server fetches data asynchronously and renders the entire page on-the-fly as a single flat HTML file. At this point in the process, the application is not reactive to user input and interaction; it’s simply a flat HTML page.
It isn’t until the “hydration” process where the application’s page becomes reactive to user’s input and reacts more like a traditional client-side single page application. During hydration, the Virtual DOM is activated and the state gets initialized. This rendering on-the-fly allows for each page that is crawled to have to necessary information it needs for SEO.
You can see how rendering on-the-fly can add some stress on the server. However, it provides...