Struct dioxus_router::RouterProps
source · [−]pub struct RouterProps<'a> {
pub children: Element<'a>,
pub base_url: Option<&'a str>,
pub onchange: EventHandler<'a, Arc<RouterCore>>,
}Expand description
The props for the Router component.
Fields
children: Element<'a>The routes and elements that should be rendered when the path matches.
If elements are not contained within Routes, the will be rendered regardless of the path.
base_url: Option<&'a str>The URL to point at
This will be used to trim any latent segments from the URL when your app is not deployed to the root of the domain.
onchange: EventHandler<'a, Arc<RouterCore>>Hook into the router when the route is changed.
This lets you easily implement redirects
Implementations
sourceimpl<'a> RouterProps<'a>
impl<'a> RouterProps<'a>
Trait Implementations
sourceimpl<'a> Properties for RouterProps<'a>
impl<'a> Properties for RouterProps<'a>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for RouterProps<'a>
impl<'a> !Send for RouterProps<'a>
impl<'a> !Sync for RouterProps<'a>
impl<'a> Unpin for RouterProps<'a>
impl<'a> !UnwindSafe for RouterProps<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more