Next.js by Example

Develop static websites and hybrid (static+SSR) web apps with React and Next.js 11, including Tailwind CSS, React Query

Described as “The React Framework for Production”, Next.js makes it easy to build highly optimized web applications in React.

What you’ll learn

  • Develop web applications with Next·js.
  • Style components with styled-jsx or Tailwind CSS.
  • Build fully static websites or hybrid (static + SSR) apps.
  • Fetch data from a remote API such as a Headless CMS.
  • Implement cookie-based JWT authentication.
  • Cache data with React Query.

Course Content

  • Getting Started –> 6 lectures • 28min.
  • Routing and Navigation –> 5 lectures • 21min.
  • Styling –> 3 lectures • 16min.
  • Loading Data –> 12 lectures • 56min.
  • Client-side Functionality –> 6 lectures • 34min.
  • Deployment –> 5 lectures • 25min.
  • Next Shop: Setup –> 9 lectures • 52min.
  • Data Fetching –> 16 lectures • 1hr 27min.
  • Responsive Design and Image Optimization –> 5 lectures • 27min.
  • Authentication –> 13 lectures • 1hr 12min.
  • React Query –> 7 lectures • 43min.
  • Shopping Cart (Exercises) –> 5 lectures • 21min.

Next.js by Example

Requirements

  • Familiarity with modern web development: HTML, CSS, JavaScript, npm.
  • Familiarity with React, including the useState and useEffect hooks.

Described as “The React Framework for Production”, Next.js makes it easy to build highly optimized web applications in React.

This course will guide you through learning Next.js by developing two examples: a fully static website, and a hybrid (static + server-side rendered) app.

The first example, a personal blog website, will introduce you to fundamental Next.js concepts such as pre-rendering, file-system based routing, and hydration.

It will show you how to load data in pages that are statically generated at build time, and how to style your pages in global CSS files or with the styled-jsx library that provides component-scoped styles.

The Deployment section will present you all the options for running your application in production, from fully-managed serverless platforms like Vercel to configuring your own Linux servers.

The second example you will develop is a shop website. This will be a more complex application that loads its data from a Headless CMS (Strapi) and uses advanced Next.js features such as Incremental Static Regeneration to automatically reflect changes in the backend data.

It will show you how to enable TypeScript support in a Next.js project if you wish to do so. Using TypeScript is optional; all but one of the videos use plain JavaScript. But you will find the full TypeScript code for the shop example in a GitHub repository if you prefer TypeScript.

The website will use the popular Tailwind CSS library for styling, and the Next Image component for image optimization.

You will see different ways to load data from an external API, including writing your own API routes in Next.js, and how to choose the best approach for your specific requirements.

The example will include a secure authentication system based on JWT and cookies, and the React Query library will be used for caching data on the client side.

The full source code for all examples is provided, with an easy way to see the changes made in every lecture.

The course is up to date with the latest Next.js version i.e. 11.

Get Tutorial