Skip to content

Upgrading to 0.27.0 ​

Breaking changes ​

Reachable route paths ​

A named route's combined path must start with /. The router now throws UnreachableRouteError for definitions that cannot be reached. Add the leading slash to a root path; a child's path can still be relative to its parent.

See Path.

useLink no longer accepts undefined as its source, and the RouterLink to callback must return a destination. Guard missing lookup results before rendering a link, or provide a valid fallback URL.

ts
// Before
const link = useLink(() => router.find(url))

// After
const link = useLink(() => router.find(url) ?? '/fallback')

The broad string overload no longer bypasses route name and required param checking. Use a known route name with its params, or a URL string. See useLink and RouterLink.

Resolved route exports ​

Internal resolved-route helpers are no longer exported through the package entry point. Use ResolvedRoute, ResolvedRouteUnion, or RouterResolvedRouteUnion for public annotations, and isResolvedRoute to check resolved values. Prefer typeof route when preserving an application's inferred route type.

Full release notes.