Chapter 4, Adding Server-Side Rendering to Your React Application
Chapter Goal:
· Importance of Server-Side Rendering
· Building a Simple React App
· Using DOM to Post Content
· Using React Calls to Post Content
· Creating Functional React Component
· Passing Props to Functional React Component
· Converting Functional Component to Class Component
· Using JSX & Next.js for Server-Side Rendering
· Adding CSS to Next.js
· Integrating Bootstrap 4 to Your App
Chapter 5, Unit Testing using Jest
Chapter Goal:
· Setting Up Jest
· Writing Your First Test Using Jest
· Matchers
· Using Enzyme to Access React DOM
· Testing a React Component
Chapter 6, Deploying Your App to a Server
Chapter Goal:
· Deployment Basics
· Setting up Environment Variables
· Introduction to Docker
· Creating a Docker Container for Your App
· Hosting the Container
Mohit Thakkar is a Software Engineer with a multinational company. He has published five books and a research paper in the International Journal of Advanced Research in Management, Architecture, Technology and Engineering.
Leverage the benefits of both client-side and server-side rendering to get the most out of your React applications. By the end of this book you will be able to build and deploy React applications using the Next.js framework to fully render server-side HTML on every Web page.
You'll begin by reviewing JavaScript fundamentals and how they work with the core principles of React. You'll then move on to Next.js, the React framework for server-rendered applications. Using this framework, you will create a fast and secure solutional React application that renders content on the server-side, protects sensitive information, and optimizes response times. Before deploying the application using Docker containers, you'll create automated unit tests to verify that every component is appropriately doing its job
Building React Apps with Server-Side Rendering also covers other fun and interesting topics such as Bootstrap 4, JSX (JavaScript XML), adding styling to your React applications, and much more. By the end of this book, you will be able to build and deploy React applications that fully render server-side HTML on every page. In the end you'll have a client-side rendered React application that integrates server-side rendering into it using Next.js framework.
You will:
Examine fundamental concepts of JavaScript (ES 2015)
Create client-side apps using JavaScript frameworks React and Redux
Add server-side rendering to React apps using the NextJS Framework