Module 03 of 10

Routing & Layouts

Lessons

About This Module

In plain React you install a router and wire every page by hand. In Next.js the folder structure is the router: add a folder with a page.tsx inside the app directory and you have a URL. This module covers the App Router, the way almost every modern Next.js app is organised.

You will build nested routes and dynamic routes such as [slug], group pages with route groups, and share navigation and chrome across pages with layouts, including the required root layout. You will also add loading, error and not-found states, and move between pages with the Link component and the useRouter hook.

Watch the lessons in order, then continue on to Server & Client Components.

Lessons

4 videos
01

NextJS App Router Intro and Tour

Dan Ott walks through the App Router in a talk for Virtual Coffee: basic routes, the root layout, nested layouts, route groups and dynamic routes, with a companion GitHub repo.

02

Next.js 14 Complete Course 2024 – Full Stack App Tutorial

Lama Dev covers the Next.js 14 folder structure, App Router routing, layouts, loading, error and not-found files, and navigation with links, useRouter and params.

03

Next.js 14 Full Course

Coding Addict builds an app from scratch, creating pages, linking them with the Link component, and nesting pages and layouts in the App Router.

04

Use Next.js, Tailwind CSS, and MongoDB to Build a Ticketing Application

Jacob Lower builds a ticketing app on freeCodeCamp with the App Router, giving you a hands-on project that puts routing and layouts to work.