Server-side rendering versus single-page apps
In Chapter 4, Serving and Embedding HTML Content, we created our app as a server-side rendered app. What this means is that all of the content and assets, including the HTML, are generated on the backend and sent on each page request. There’s nothing wrong with this; our publisher, Packt, uses server-side rendering (SSR) for its own site at https://www.packtpub.com/. SSR as a technique is used by technologies such as WordPress and many other sites that host content that changes less frequently and may have less interactivity.
The alternative to SSR we’re going to use for our app is client-side rendering (CSR). CSR works by having the client fetch the app as a bundle of JavaScript and other assets, executing the JavaScript and the app dynamically, and binding to an element that takes over the page rendering. The app creates and renders each route dynamically in the browser. This is all done without requiring any reloading...