Navigation Targets
In the previous chapter, we learned how to create links to pages within our app.target
property. This property takes something that can be converted to a NavigationTarget
.
What is a navigation target?
A NavigationTarget
is similar to the href
of an HTML anchor element. It
Internal
: We used internal links in the previous chapter. It's a link to a page within ourExternal
: This works exactly like an HTML anchors'href
. Don't use this for in-app
External navigation
If we need a link to an external page we can do it like this:
src/external_link.rs
fn GoToDioxus(cx: Scope) -> Element { render! { Link { to: "https://dioxuslabs.com", "ExternalTarget target" } } }