Lesson 6.1

Params and wildcards

The three kinds of route segment, where param and wildcard captures live in the radix tree, and how insert attaches them to static edges.

32 minsrc/router.js
  • Tell static, param, and wildcard segments apart and state exactly what each one matches.
  • Point at the RadixNode slots where param and wildcard captures live.
  • Split a route pattern at its first marker and attach a capture child to the static tree.
Locked

This chapter is part of the framework capstone. Chapters 1 and 2 are free to build - unlock the rest to keep going.

Unlock the depth