You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// # Example
/// ```rust, no_run
/// # use dioxus::prelude::*;
/// fn LoadScript() -> Element {
/// rsx! {
/// // You can use the Script component to render a script tag into the head of the page
/// Script {
/// src: asset!("./assets/script.js"),
/// }
/// }
/// }
///
But since the use of direct links is removed from manganis, an error occurs when specifying a link directly.
fn App() -> Element {
use_context_provider(|| Signal::new("en".to_string()));
let mut lang: Signal<String> = use_context();
info!("Lang is {}", lang());
rsx! {
head::Link { rel: "stylesheet", href: STYLE }
// Note: For development use only. Remove before production.
Script { src: "https://cdn.tailwindcss.com" }
Router::<Route> {}
}
}
Environment:
Dioxus version: 0.6.0-alpha.2 (b254692) from github 19/09/24
Rust version: rustc 1.81.0 (eeb90cda1 2024-09-04)
OS info: Win11
App platform: web
The text was updated successfully, but these errors were encountered:
ealmloff
changed the title
Script has some issue inside rsx
Script ignores src attribute
Sep 19, 2024
The documentation specifies its use as
But since the use of direct links is removed from manganis, an error occurs when specifying a link directly.
Environment:
The text was updated successfully, but these errors were encountered: