Pages, layouts and links

5:53 film

After this film you cancreate pages and a shared layout, link between them, and read a dynamic route's params.

Exercise

Download the exercise (a zip). Unzip it, read exercise.md, then in exercise/ run npm install and node check.mjs. The checker runs a real build and says PASS or FAIL for each criterion.

Recall

Answer each one out loud before you open it.

  1. What turns a folder into a route someone can visit?

    A page file inside it.

  2. Why does the header stay when Alice clicks a link?

    It lives in the layout, and Link swaps only the page.

  3. How does one dynamic segment's page file know which lamp to show?

    It awaits its params and reads the id.

Docs this film covers