Function leptos_router::Router
source · pub fn Router(props: RouterProps) -> impl IntoView
Expand description
Provides for client-side and server-side routing. This should usually be somewhere near the root of the application.
§Required Props
- children:
Children
§Optional Props
- base: [
&'static str
]- The base URL for the router. Defaults to
""
.
- The base URL for the router. Defaults to
- fallback: [
fn() -> View
]- A fallback that should be shown if no route is matched.
- set_is_routing:
impl Into<SignalSetter<bool>>
- A signal that will be set while the navigation process is underway.
- trailing_slash:
TrailingSlash
- How trailing slashes should be handled in [
Route
] paths.
- How trailing slashes should be handled in [
- id:
usize
- A unique identifier for this router, allowing you to mount multiple Leptos apps with different routes from the same server.