Skip to content

0.28.0 — Dynamic routes without a router

Choose a tag to compare

@github-actions github-actions released this 02 Jun 17:26
· 35 commits to main since this release

Added

  • <LiveTokensRouter> gains a resolve prop for routes you can't enumerate.
    Pass resolve: (path) => RouteEntry | null to match params (/module/:id),
    prefixes, or conditionally-gated paths in plain code, with no route syntax to
    learn. Resolution order is pages[path], then resolve(path), then the
    pages['/'] fallback, so existing pages-only consumers are unaffected.
  • RouteEntry gains props. A static or resolved entry can pass props to
    its page, so one component can serve many paths (for example the matched id
    or slug). The entry's source now drives "Page Source" on dynamic routes
    too, so it can't desync from the dispatched page.