Site / Site and the Router

What the Site does not do

  • It does not parse anything new. The routers are the URL story, and literal, query, rest and schemaSegment behave as Foldkit says. A catch-all router (/:slug) still belongs after the nodes whose literal it would also take, as it does in oneOf.
  • It holds no state. The route is a field of your Model, written in update through the set you give. The Site never reads window.location.
  • It does not fetch or wait. There are no loaders: navigating sets the route at once, and the Surfaces a node names declare what Remote fetches as a result.
  • It does not change the runtime. makeApplication's routing config and its two Messages are the same with or without a Site.

When the Router alone is enough

A single screen, or a few screens without sections, nav, shortcuts or titles to keep in step, needs only Foldkit's Router and two update branches. Reach for the Site when you start keeping a second list of your routes: a nav, a title per route, a sitemap, or a page that must hear when its route arrives.