Book Image

Next.js Quick Start Guide

By : Kirill Konshin
Book Image

Next.js Quick Start Guide

By: Kirill Konshin

Overview of this book

Next.js is a powerful addition to the ever-growing and dynamic JavaScript world. Built on top of React, Webpack, and Babel, it is a minimalistic framework for server-rendered universal JavaScript applications. This book will show you the best practices for building sites using Next. js, enabling you to build SEO-friendly and superfast websites. This book will guide you from building a simple single page app to a scalable and reliable client-server infrastructure. You will explore code sharing between client and server, universal modules, and server-side rendering. The book will take you through the core Next.js concepts that everyone is talking about – hot reloading, code splitting, routing, server rendering, transpilation, CSS isolation, and more. You will learn ways of implementing them in order to create your own universal JavaScript application. You will walk through the building and deployment stages of your applications with the JSON API,customizing the confguration, error handling,data fetching, deploying to production, and authentication.
Table of Contents (9 chapters)

What this book covers

Chapter 1, Introduction to Server-Side Rendering and Next.js, explains the basics of frontend development, problem definition, what frameworks are available, and what problems they solve, what server-side rendering is, and why it is needed. This chapter explains the benefits of Next.js.

Chapter 2, Next.js Fundamentals, explains the fundamental things about building JavaScript apps and React apps in particular. It guides the reader through installation and the development/build life cycle of the Next.js application. You'll learn how to create website pages and wire them together through the website navigation. After that, styling and rich content approaches are explained.

Chapter 3, Next.js Configuration, will go into Webpack and Babel. It is a small chapter but definitely one worth mentioning, because it is very useful for advanced cases.

Chapter 4, Next.js Data Flow, explains the purpose of all JS applications: talking to the backend. We show different approaches, including vanilla Next JS flow, with no frameworks, which is useful for understanding the essence of interaction before moving on to look at more advanced techniques.

Chapter 5, Application Life Cycle Handlers and Business Logic, demonstrates the most important and frequently asked questions about React-based application architecture and patterns. We explain how to design and implement the core modules, such as logging and authentication, and then move on to more complex solutions for access control and business rules management.

Chapter 6, Continuous Integration, explores how to prepare the app for automatic deployment and why unit and end-to-end tests are important prerequisites. You will learn how to write tests and use online continuous integration tools.

Chapter 7, Containers, provides information about virtual machine containers exploring, why they are useful. You will learn about the most popular container framework, Docker, and how to configure an image for it. After that, you'll learn how to deploy your application to online services that provide container-based infrastructure.