pub fn Link(props: LinkProps) -> Element
Expand description
Render a link
tag into the head of the page.
The Link component in dioxus router and this component are completely different. This component links resources in the head of the page, while the router component creates clickable links in the body of the page.
ยงExample
fn RedBackground() -> Element {
rsx! {
// You can use the meta component to render a meta tag into the head of the page
// This meta tag will redirect the user to the dioxuslabs homepage in 10 seconds
document::Link {
href: asset!("/assets/style.css"),
rel: "stylesheet",
}
}
}
Any updates to the props after the first render will not be reflected in the head.