Component similar to A (from @solidjs/router) but with strong typing for paths and parameters.
import { Link } from "dreamkit";
import type { JSXElement } from "solid-js"; declare function Link(props: { href: string; params?: Record<string, any>;}): JSXElement;
import { $route, Link, s } from "dreamkit"; export const sectionRoute = $route .path("/section") .params({ name: s.string() }) .create(({ params }) => ( <> <p>section: {params.name}</p> <Link href="/">Go to home</Link> </> )); export default $route.path("/").create(() => ( <> <Link href="/section" params={{ name: "one" }}> Go to section one </Link> </>));