Outlet
Renders the child route of the current depth.
Renders the child route of the current depth.
The depth is one more than the nearest route above (the root Outlet is depth 0). The Outlet
rebuilds only when the route at its depth changes id, so a layout keeps its state across
navigations between its children. A route that leaves the match list is disposed with everything
it created. A route's error needs the errors feature and its head the head feature; the
router refuses either one when the feature is missing.
Import#
ts
import { Outlet } from "@shadow-js/router";
Signature#
ts
function Outlet(): Accessor<unknown>
Returns#
An accessor of the content, to be inserted where the outlet sits.
Examples#
ts
const layout = () => <main><Outlet /></main>;