Closed DevinLeamy closed 1 year ago
This can be temporarily fixed with this patch in lib.rs
// https://stackoverflow.com/questions/23975391/how-to-convert-a-string-into-a-static-str
fn string_to_static_str(s: String) -> &'static str {
Box::leak(s.into_boxed_str())
}
fn to_option_string(s: impl Display) -> Option<AttrValue> {
let s = s.to_string();
if s.is_empty() {
None
} else {
Some(AttrValue::Static(string_to_static_str(s))) // <--- Problematic line
}
}
Closing this as the library has been updated to next Yew version.
The next version of Yew will be introducing the
BaseComponent
, which will function to replace the existingComponent
trait. Consequently, existing components will not be able to be used inhtml! { ... }
.This can be demonstrated by using
yew = { git = "https://github.com/yewstack/yew.git", features = ["csr"] }
and tryingDocs for the new version: https://api.yew.rs/next/yew/prelude/trait.BaseComponent.html
p.s. This component library is exactly what I'm looking for! Thanks for building it!