Guides
Using Route Registry
Add explicit route activation and active-state behavior when standard anchor or path hints are not enough.
Need the shortest path?
Use Quick Start when you want the smallest working route → scan → graph → run flow first.
Something feels off?
Inspect scan output, graph state, active route/context, and dispatch in a practical order.
Need the full surface?
Browse all runtime methods, hooks, extension points, and lifecycle APIs.
Use the route registry when route activation needs explicit application-side logic.
Typical example
ts
6 lines
Cinder.registerRoute({
key: 'reports',
path: '/reports',
navigate: () => router.navigate('/reports'),
isActive: () => window.location.pathname === '/reports',
});When to use it
Use route registration when:
- your router is not driven by standard anchors
- route activation should call framework navigation directly
- active-state detection needs application-specific logic
- path or selector hints alone are not enough
When not to use it
If a tagged route already has enough standard DOM information, prefer tag-only behavior first:
- anchors with
href data-cinder-pathdata-cinder-route-selectoraria-current
Related pages
Continue reading