With our progress from the last chapter, we are now serving multiple pages under different paths with our React application. All of the routing happens directly on the client. In this chapter, we will look at the advantages and disadvantages of server-side rendering. By the end of the chapter, you will have configured Graphbook to serve all pages as pre-rendered HTML from the server instead of the client.
This chapter covers the following topics:
- An introduction to server-side rendering
- Setting up Express.js to render React on the server
- Enabling JWT authentication in connection with server-side rendering
- Running all GraphQL queries in the React tree