Summary
In this chapter, you have learned the basics of Next.js, a popular React-based full-stack framework that, coupled with FastAPI and MongoDB, allows you to build any virtually any type of web application.
You have learned how to create a new Next.js project, how to implement routing with the new App Router, and how to fetch data with server components.
Important Next.js concepts, such as Server Actions, form handling, and cookies were also introduced and implemented. Apart from this, you explored some of the Next.js optimizations such as the Image
component for serving optimized images, the Metadata
tags, and how to create a production build.
Finally, you deployed your Next.js application on Netlify, but the underlying principles of deployment remain the same for other providers.
Next.js is a rich and complex ecosystem in its own right, and you should consider this chapter as a starting point for your next application, which blends the best of the three worlds: FastAPI...