Getting Started with Next.js
Up until now, we have been using various libraries and tools to develop full-stack web applications. Now, we introduce Next.js as an enterprise-ready full-stack web application framework for React. Next.js combines all the functions and tools you need for full-stack web development in one package. In this book, we use Next.js because it is currently the most popular framework supporting all new React features, such as React Server Components and Server Actions, which are the future of full-stack React development. However, there are other frameworks for full-stack React, such as Remix, which have recently also started supporting the new React features.
In this chapter, we will learn how Next.js works and what its advantages are. Then, we will re-create our blog project in Next.js to highlight the differences between using a simple bundler such as Vite, and a full framework such as Next.js. Along the way, we will learn how the Next.js App Router works...