dioxus/docs/router/examples/external_link.rs

29 lines
486 B
Rust
Raw Normal View History

2023-06-01 18:13:59 +00:00
#![allow(non_snake_case, unused)]
use dioxus::prelude::*;
use dioxus_router::prelude::*;
#[derive(Routable, Clone)]
enum Route {
#[route("/")]
Home {},
}
#[inline_props]
fn Home(cx: Scope) -> Element {
todo!()
}
fn main() {}
// ANCHOR: component
fn GoToDioxus(cx: Scope) -> Element {
render! {
Link {
2023-07-24 18:57:56 +00:00
to: NavigationTarget::External("https://dioxuslabs.com".into()),
2023-06-01 18:13:59 +00:00
"ExternalTarget target"
}
}
}
// ANCHOR_END: component