[]previous and next page

useMatches

Every match on screen, outermost first.

Every match on screen, outermost first. Reactive.

Import#

ts
import { useMatches } from "@shadow-js/router";

Signature#

ts
function useMatches(): Accessor<readonly RenderedMatch[]>

Returns#

An accessor of the chain.

Examples#

ts
import { useMatches } from "@shadow-js/router";
const chain = useMatches();
chain().map((match) => match.id); // the ids, outermost first