Skip to main content

Module router

Module router 

Source
Expand description

UI-6: the router — manifest.routes: a hash route (#/ticket/T-1) to the component drawn (a layout too) and its props, each :name segment of the pattern a prop. The most specific pattern wins: one with fewer : segments over one with more (#/ticket/new over #/ticket/:id).

STUDIO-3: the service’s rows (ui.routes, a pattern → a component) are merged over manifest.routes (Router::merged): a row replaces the manifest’s route for its pattern, or adds one; a row whose component the version does not hold is passed over, so the manifest’s own route (or none) stands there.

Structs§

Route
A resolved route.
Router
The routes of the live version.

Functions§

decode
UI-8: a segment percent-decoded — the browser keeps the hash encoded (#/f/status%20Ready), and a prop is the text (status Ready); a % that starts no escape, or bytes that are not UTF-8, are kept as written.