Lesson 1.1

File-system routing and the app directory

The App Router maps folders to URL segments and reserved filenames to behaviour. Once you can read a folder tree as a set of routes, most of the framework stops being magic.

Duration
6m
Level
Intermediate
Students
18k students

Overview

The App Router maps folders to URL segments and reserved filenames to behaviour. Once you can read a folder tree as a set of routes, most of the framework stops being magic.

In this lesson you will:

  • Map folders and page files to URL segments
  • Use route groups to organise without affecting the URL
  • Recognise the reserved files: page, layout, loading, error, not-found

Resources

Next.js documentation

The official reference for the tools used in this lesson.