dioxus/examples/generic_component.rs

14 lines
231 B
Rust
Raw Normal View History

use dioxus::prelude::*;
fn main() {
dioxus_desktop::launch(app);
}
fn app(cx: Scope) -> Element {
2022-11-18 04:00:39 +00:00
cx.render(rsx! { generic_child::<i32>{} })
}
fn generic_child<T>(cx: Scope) -> Element {
2022-11-18 04:00:39 +00:00
cx.render(rsx! { div {} })
}