Logo Navs

Router Type

Static members

Static member Description

Router.build (routes, ?splash, ?logger, ?maxCyclicRedirects)

Full Usage: Router.build (routes, ?splash, ?logger, ?maxCyclicRedirects)

Parameters:
    routes : RouteDefinition<'View> seq - The route definitions the router will use to match URLs and render views.
    ?splash : unit -> 'View - An optional function that produces a view to render while the first navigation is triggered, before any route has been activated.
    ?logger : ILogger - An optional logger used to trace the router's activity.
    ?maxCyclicRedirects : int - Maximum number of distinct (from, target) redirect pairs the router will follow while resolving a single navigation. Defaults to 5. This guards against redirect cycles; it does not cap the length of linear redirect chains, which are expected to terminate on their own.

Returns: IRouter<'View>
Type parameters: 'View

Get an instance of IRouter with the given routes. and optionally a splash screen.

routes : RouteDefinition<'View> seq

The route definitions the router will use to match URLs and render views.

?splash : unit -> 'View

An optional function that produces a view to render while the first navigation is triggered, before any route has been activated.

?logger : ILogger

An optional logger used to trace the router's activity.

?maxCyclicRedirects : int

Maximum number of distinct (from, target) redirect pairs the router will follow while resolving a single navigation. Defaults to 5. This guards against redirect cycles; it does not cap the length of linear redirect chains, which are expected to terminate on their own.

Returns: IRouter<'View>

Type something to start searching.