When we talk about JavaScript web applications, we usually think of client-side code that lives in the browser.
The way they usually work is that the server returns an empty HTML page with a script tag to load the application. When the application is ready, it manipulates the DOM inside the browser to show the UI and to interact with users. This has been the case for the last few years, and it is still the way to go for a huge number of applications.
In this book, we have seen how easy it is to create applications using React components and how they work within the browser. What we have not seen yet is how React can render the same components on the server, giving us a powerful feature called server-side rendering (SSR).
Before going into the details, let's try to understand what it means to create applications that render both on the server and the...