Interesting idea. it might look cleaner with Html{..} and so on
2025 is over. we still don't have named arg, default value, variadic for function. ![]()
but have default field for struct.
maybe future ui lib can be
fn App()->impl Compose {
let mut counter = use_state(0);
return VBox {
padding: 10.px(),
children: (
Lable {
text: counter.to_string(),
..},
Button {
text: "Hit me",
onclick: || counter.set(counter+1),
..}
),
..}
}
Have you seen dioxus - Rust ?
Yes. That's a good crate, i like its design (and hotreload)
updated. now it use #![feature(default_field_values)]