Implementing Server-Side Rendering

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

Get Hands-On Full-Stack Web Development with GraphQL and React 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.