Selective server-side rendering with data

When we developed the frontend of the base skeleton application in Chapter 4, Adding a React Frontend to Complete MERN, we integrated basic server-side rendering to be able to load client-side routes directly from the browser address bar when the request goes to the server. In this SSR implementation, while rendering the React components server-side, we did not consider loading the data from the database for the components that displayed data. The data only loads in these components when the client-side JavaScript takes over after the initial load of the server-side rendered markup.

We did update this implementation to add server-side rendering with data for the individual media detail pages in the ...

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.